Changed to use sys_readbios get the 'machine ID'.
This commit is contained in:
parent
dcb7cae67c
commit
a3fce7ce8d
@ -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
|
/* 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.
|
* for PS_386 and PC_AT this is possible. Otherwise, return an error.
|
||||||
*/
|
*/
|
||||||
sys_vircopy(SELF, BIOS_SEG, (vir_bytes) MACHINE_ID_ADDR,
|
s = sys_readbios( MACHINE_ID_ADDR, &mach_id, MACHINE_ID_SIZE);
|
||||||
SELF, D, (vir_bytes) &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) {
|
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);
|
return(EFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user