Some PnP BIOSsen return garbage in the high byte of the number-of-devices
field (or don't set the high byte at all). Clear it to avoid reporting a silly number of devices. Reported by: phk
This commit is contained in:
parent
9db4bbf32a
commit
03c6be5cdc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51193
@ -514,6 +514,7 @@ pnpbios_scan(void)
|
||||
|
||||
if ((error = bios16(&args, PNP_COUNT_DEVNODES, &ndevs, &bigdev)) || (args.r.eax & 0xff))
|
||||
printf("pnpbios: error %d/%x getting device count/size limit\n", error, args.r.eax);
|
||||
ndevs &= 0xff; /* clear high byte garbage */
|
||||
if (bootverbose)
|
||||
printf("pnpbios: %d devices, largest %d bytes\n", ndevs, bigdev);
|
||||
|
||||
|
@ -514,6 +514,7 @@ pnpbios_scan(void)
|
||||
|
||||
if ((error = bios16(&args, PNP_COUNT_DEVNODES, &ndevs, &bigdev)) || (args.r.eax & 0xff))
|
||||
printf("pnpbios: error %d/%x getting device count/size limit\n", error, args.r.eax);
|
||||
ndevs &= 0xff; /* clear high byte garbage */
|
||||
if (bootverbose)
|
||||
printf("pnpbios: %d devices, largest %d bytes\n", ndevs, bigdev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user