From 5f67689cbb2b102491eb69fa1165fd9ee050f698 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Wed, 2 Feb 2005 15:42:48 +0000 Subject: [PATCH] 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 --- reactos/boot/freeldr/freeldr/arch/i386/hardware.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/boot/freeldr/freeldr/arch/i386/hardware.c b/reactos/boot/freeldr/freeldr/arch/i386/hardware.c index afb2a376baf..ec0b3b76f6d 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/hardware.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/hardware.c @@ -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"));