Make dev node count correct, since for example Mac Virtual PC BIOS reports slightly...
authorAleksey Bragin <aleksey@reactos.org>
Wed, 2 Feb 2005 15:42:48 +0000 (15:42 +0000)
committerAleksey Bragin <aleksey@reactos.org>
Wed, 2 Feb 2005 15:42:48 +0000 (15:42 +0000)
This patch removes "Memory allocation failed: Out of memory" error while booting Freeldr.

svn path=/trunk/; revision=13387

reactos/boot/freeldr/freeldr/arch/i386/hardware.c

index afb2a37..ec0b3b7 100644 (file)
@@ -351,6 +351,9 @@ DetectPnpBios(HKEY SystemKey, U32 *BusNumber)
 
 
   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)
     {
       DbgPrint((DPRINT_HWDETECT, "PnP-BIOS failed to enumerate device nodes\n"));