[FREELDR]
authorSylvain Petreolle <spetreolle@yahoo.fr>
Fri, 24 May 2013 12:24:27 +0000 (12:24 +0000)
committerSylvain Petreolle <spetreolle@yahoo.fr>
Fri, 24 May 2013 12:24:27 +0000 (12:24 +0000)
Take in account the boot disk in the number of detected disks.
It allows booting without a hard disk (e.g cdrom/floppy alone with an USB storage device)

svn path=/trunk/; revision=59079

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

index c09e381..e0a2045 100644 (file)
@@ -313,8 +313,6 @@ HwInitializeBiosDisks(VOID)
         memset((PVOID) DISKREADBUFFER, 0xcd, 512);
     }
     DiskReportError(TRUE);
-    TRACE("BIOS reports %d harddisk%s\n",
-          (int)DiskCount, (DiskCount == 1) ? "": "s");
 
     /* Get the drive we're booting from */
     MachDiskGetBootPath(BootPath, sizeof(BootPath));
@@ -349,8 +347,12 @@ HwInitializeBiosDisks(VOID)
         reactos_disk_count++;
 
         FsRegisterDevice(BootPath, &DiskVtbl);
+        DiskCount++;
     }
 
     PcBiosDiskCount = DiskCount;
+    TRACE("BIOS reports %d harddisk%s\n",
+          (int)DiskCount, (DiskCount == 1) ? "": "s");
+
     return DiskCount != 0;
 }