From a3fce7ce8d49846b422dbd8f71e94cdc55f1ef1e Mon Sep 17 00:00:00 2001 From: Philip Homburg Date: Mon, 10 Jul 2006 12:35:55 +0000 Subject: [PATCH] Changed to use sys_readbios get the 'machine ID'. --- drivers/cmos/cmos.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/cmos/cmos.c b/drivers/cmos/cmos.c index d1d0e7444..b53106eef 100644 --- a/drivers/cmos/cmos.c +++ b/drivers/cmos/cmos.c @@ -147,10 +147,13 @@ PRIVATE int gettime(int who, int y2kflag, vir_bytes dst_time, int safe) /* First obtain the machine ID to see if we can read the CMOS clock. Only * for PS_386 and PC_AT this is possible. Otherwise, return an error. */ - sys_vircopy(SELF, BIOS_SEG, (vir_bytes) MACHINE_ID_ADDR, - SELF, D, (vir_bytes) &mach_id, MACHINE_ID_SIZE); + s = sys_readbios( MACHINE_ID_ADDR, &mach_id, MACHINE_ID_SIZE); + if (s != 0) { + printf("gettime: sys_readbios failed: %d\n", s); + return EINVAL; + } if (mach_id != PS_386_MACHINE && mach_id != PC_AT_MACHINE) { - printf("IS: Machine ID unknown. ID byte = %02x.\n", mach_id); + printf("gettime: machine ID unknown. ID byte = %02x.\n", mach_id); return(EFAULT); } -- 2.44.0