Make dev node count correct, since for example Mac Virtual PC BIOS reports slightly wrong number which must be &0xFF.

This patch removes "Memory allocation failed: Out of memory" error while booting Freeldr.

svn path=/trunk/; revision=13387
This commit is contained in:
Aleksey Bragin 2005-02-02 15:42:48 +00:00
parent 446441503d
commit 5f67689cbb

View file

@ -351,6 +351,9 @@ DetectPnpBios(HKEY SystemKey, U32 *BusNumber)
x = PnpBiosGetDeviceNodeCount(&NodeSize, &NodeCount); x = PnpBiosGetDeviceNodeCount(&NodeSize, &NodeCount);
NodeCount &= 0xFF; // needed since some fscked up BIOSes return
// wrong info (e.g. Mac Virtual PC)
// e.g. look: http://my.execpc.com/~geezer/osd/pnp/pnp16.c
if (x != 0 || NodeSize == 0 || NodeCount == 0) if (x != 0 || NodeSize == 0 || NodeCount == 0)
{ {
DbgPrint((DPRINT_HWDETECT, "PnP-BIOS failed to enumerate device nodes\n")); DbgPrint((DPRINT_HWDETECT, "PnP-BIOS failed to enumerate device nodes\n"));