[ros-diffs] [tkreuzer] 52171: {FREELDR] Rename global variables BootDrive to FrldrBootDrive and BootPartition to FrldrBootPartition

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Fri Jun 10 12:12:17 UTC 2011


Author: tkreuzer
Date: Fri Jun 10 12:12:16 2011
New Revision: 52171

URL: http://svn.reactos.org/svn/reactos?rev=52171&view=rev
Log:
{FREELDR]
Rename global variables BootDrive to FrldrBootDrive and BootPartition to FrldrBootPartition

Modified:
    trunk/reactos/boot/freeldr/freeldr/arch/i386/arch.S
    trunk/reactos/boot/freeldr/freeldr/arch/i386/boot.S
    trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c
    trunk/reactos/boot/freeldr/freeldr/arch/i386/linux.S
    trunk/reactos/boot/freeldr/freeldr/disk/disk.c
    trunk/reactos/boot/freeldr/freeldr/include/disk.h

Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/arch.S
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i386/arch.S?rev=52171&r1=52170&r2=52171&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/arch.S [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/arch.S [iso-8859-1] Fri Jun 10 12:12:16 2011
@@ -50,14 +50,14 @@
 
 	/* Zero BootDrive and BootPartition */
 	xor eax, eax
-	mov dword ptr [_BootDrive], eax
-	mov dword ptr [_BootPartition], eax
+	mov dword ptr [_FrldrBootDrive], eax
+	mov dword ptr [_FrldrBootPartition], eax
 
 	/* Store the boot drive */
-	mov byte ptr [_BootDrive], dl
+	mov byte ptr [_FrldrBootDrive], dl
 
 	/* Store the boot partition */
-	mov byte ptr [_BootPartition], dh
+	mov byte ptr [_FrldrBootPartition], dh
 
 	/* GO! */
 	push eax
@@ -302,7 +302,7 @@
 
 	/* Align 32 bits boundary */
 .align 4
-	
+
 	/* Multiboot header */
 MultibootHeader:
 	/* magic */
@@ -400,12 +400,12 @@
 	mov eax, [ebx + MB_INFO_BOOT_DEVICE_OFFSET]
 	shr eax, 16
 	inc al
-	mov byte ptr _BootPartition, al
-	mov byte ptr _BootDrive, ah
+	mov byte ptr _FrldrBootPartition, al
+	mov byte ptr _FrldrBootDrive, ah
 	jmp mb6
 mb5:	/* No boot device known, assume first partition of first harddisk */
-	mov byte ptr _BootDrive, HEX(80)
-	mov byte ptr _BootPartition, 1
+	mov byte ptr _FrldrBootDrive, HEX(80)
+	mov byte ptr _FrldrBootPartition, 1
 mb6:
 	/* Check for command line */
 	mov eax, offset cmdline
@@ -415,7 +415,7 @@
 mb7:
 
 	/* GO! */
-	push eax	
+	push eax
 	call	_BootMain
 
 mbfail:
@@ -496,8 +496,8 @@
 cmdline:
 	.fill	CMDLINE_SIZE, 1, 0
 
-EXTERN(_BootDrive)
+EXTERN(_FrldrBootDrive)
     .long 0
-    
-EXTERN(_BootPartition)
+
+EXTERN(_FrldrBootPartition)
     .long 0

Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/boot.S
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i386/boot.S?rev=52171&r1=52170&r2=52171&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/boot.S [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/boot.S [iso-8859-1] Fri Jun 10 12:12:16 2011
@@ -31,7 +31,7 @@
 	.code16
 
 	/* Set the boot drive */
-	movb	(_BootDrive),%dl
+	movb	(_FrldrBootDrive),%dl
 
 	/* Load segment registers */
 	cli

Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c?rev=52171&r1=52170&r2=52171&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] Fri Jun 10 12:12:16 2011
@@ -736,7 +736,7 @@
   DPRINTM(DPRINT_HWDETECT,
 	    "Floppy count: %u\n",
 	    FloppyCount);
-  
+
   Size = sizeof(CM_PARTIAL_RESOURCE_LIST) +
 	 2 * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
   PartialResourceList = MmHeapAlloc(Size);
@@ -808,11 +808,11 @@
     ULONG Size;
     ULONG i;
     BOOLEAN Changed;
-    
+
     /* Count the number of visible drives */
     DiskReportError(FALSE);
     DiskCount = 0;
-    
+
     /* There are some really broken BIOSes out there. There are even BIOSes
         * that happily report success when you ask them to read from non-existent
         * harddisks. So, we set the buffer to known contents first, then try to
@@ -838,7 +838,7 @@
     DiskReportError(TRUE);
     DPRINTM(DPRINT_HWDETECT, "BIOS reports %d harddisk%s\n",
               (int)DiskCount, (DiskCount == 1) ? "": "s");
-    
+
     /* Allocate resource descriptor */
     Size = sizeof(CM_PARTIAL_RESOURCE_LIST) +
         sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount;
@@ -849,7 +849,7 @@
                   "Failed to allocate resource descriptor\n");
         return NULL;
     }
-    
+
     /* Initialize resource descriptor */
     memset(PartialResourceList, 0, Size);
     PartialResourceList->Version = 1;
@@ -860,7 +860,7 @@
     PartialResourceList->PartialDescriptors[0].Flags = 0;
     PartialResourceList->PartialDescriptors[0].u.DeviceSpecificData.DataSize =
         sizeof(CM_INT13_DRIVE_PARAMETER) * DiskCount;
-    
+
     /* Get harddisk Int13 geometry data */
     Int13Drives = (PVOID)(((ULONG_PTR)PartialResourceList) + sizeof(CM_PARTIAL_RESOURCE_LIST));
     for (i = 0; i < DiskCount; i++)
@@ -872,7 +872,7 @@
             Int13Drives[i].SectorsPerTrack = Geometry.Sectors;
             Int13Drives[i].MaxHeads = Geometry.Heads - 1;
             Int13Drives[i].NumberDrives = DiskCount;
-            
+
             DPRINTM(DPRINT_HWDETECT,
                       "Disk %x: %u Cylinders  %u Heads  %u Sectors  %u Bytes\n",
                       0x80 + i,
@@ -954,7 +954,7 @@
                            0,
                            &ControllerKey);
     DPRINTM(DPRINT_HWDETECT, "Created key: DiskController\\0\n");
-    
+
     /* Create and fill subkey for each harddisk */
     for (i = 0; i < DiskCount; i++)
     {
@@ -962,7 +962,7 @@
         ULONG Size;
         CHAR Identifier[20];
 
-        if (BootDrive == 0x80 + i)
+        if (FrldrBootDrive == 0x80 + i)
             BootDriveReported = TRUE;
 
         /* Get disk values */
@@ -986,15 +986,15 @@
     MachDiskGetBootPath(BootPath, sizeof(BootPath));
 
     /* Add it, if it's a floppy or cdrom */
-    if ((BootDrive >= 0x80 && !BootDriveReported) ||
-        DiskIsDriveRemovable(BootDrive))
+    if ((FrldrBootDrive >= 0x80 && !BootDriveReported) ||
+        DiskIsDriveRemovable(FrldrBootDrive))
     {
         /* TODO: Check if it's really a cdrom drive */
         ULONG* Buffer;
         ULONG Checksum = 0;
 
         /* Read the MBR */
-        if (!MachDiskReadLogicalSectors(BootDrive, 16ULL, 1, (PVOID)DISKREADBUFFER))
+        if (!MachDiskReadLogicalSectors(FrldrBootDrive, 16ULL, 1, (PVOID)DISKREADBUFFER))
         {
           DPRINTM(DPRINT_HWDETECT, "Reading MBR failed\n");
           return;
@@ -1746,9 +1746,9 @@
                            Size,
                            &ControllerKey);
     DPRINTM(DPRINT_HWDETECT, "Created key: KeyboardController\\0\n");
-  
+
   MmHeapFree(PartialResourceList);
- 
+
   DetectKeyboardPeripheral(ControllerKey);
 }
 
@@ -2049,14 +2049,14 @@
 
   /* Create the 'System' key */
   SystemKey = DetectSystem();
-  
+
   /* Detect buses */
   DetectPciBios(SystemKey, &BusNumber);
   DetectApmBios(SystemKey, &BusNumber);
   DetectPnpBios(SystemKey, &BusNumber);
   DetectIsaBios(SystemKey, &BusNumber);
   DetectAcpiBios(SystemKey, &BusNumber);
-  
+
   DPRINTM(DPRINT_HWDETECT, "DetectHardware() Done\n");
 
   return SystemKey;

Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/linux.S
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i386/linux.S?rev=52171&r1=52170&r2=52171&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/linux.S [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/linux.S [iso-8859-1] Fri Jun 10 12:12:16 2011
@@ -30,7 +30,7 @@
 	.code16
 
 	/* Set the boot drive */
-	movb	(_BootDrive),%dl
+	movb	(_FrldrBootDrive),%dl
 
 	/* Load segment registers */
 	cli
@@ -66,7 +66,7 @@
 	.code16
 
 	/* Set the boot drive */
-	movb	(_BootDrive),%dl
+	movb	(_FrldrBootDrive),%dl
 
 	/* Load segment registers */
 	cli

Modified: trunk/reactos/boot/freeldr/freeldr/disk/disk.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/disk/disk.c?rev=52171&r1=52170&r2=52171&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/disk/disk.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/disk/disk.c [iso-8859-1] Fri Jun 10 12:12:16 2011
@@ -111,7 +111,7 @@
 	PARTITION_TABLE_ENTRY PartitionEntry;
 	MASTER_BOOT_RECORD MasterBootRecord;
 
-	if (BootDrive < 0x80)
+	if (FrldrBootDrive < 0x80)
 	{
 		/* This is a floppy */
 
@@ -124,17 +124,17 @@
 
 		strcat(BootPath, "fdisk");
 
-		_itoa(BootDrive, Device, 10);
+		_itoa(FrldrBootDrive, Device, 10);
 		strcat(BootPath, "(");
 		strcat(BootPath, Device);
 		strcat(BootPath, ")");
 	}
 	/* FIXME */
-	else if (DiskReadBootRecord(BootDrive, 0, &MasterBootRecord))
+	else if (DiskReadBootRecord(FrldrBootDrive, 0, &MasterBootRecord))
 	{
 		/* This is a hard disk */
 
-		if (!DiskGetActivePartitionEntry(BootDrive, &PartitionEntry, &BootPartition))
+		if (!DiskGetActivePartitionEntry(FrldrBootDrive, &PartitionEntry, &FrldrBootPartition))
 		{
 			DbgPrint("Invalid active partition information\n");
 			return FALSE;
@@ -149,12 +149,12 @@
 
 		strcat(BootPath, "rdisk");
 
-		_itoa(BootDrive - 0x80, Device, 10);
+		_itoa(FrldrBootDrive - 0x80, Device, 10);
 		strcat(BootPath, "(");
 		strcat(BootPath, Device);
 		strcat(BootPath, ")");
 
-		_itoa(BootPartition, Partition, 10);
+		_itoa(FrldrBootPartition, Partition, 10);
 		strcat(BootPath, "partition(");
 		strcat(BootPath, Partition);
 		strcat(BootPath, ")");
@@ -172,7 +172,7 @@
 
 		strcat(BootPath, "cdrom");
 
-		_itoa(BootDrive - 0x80, Device, 10);
+		_itoa(FrldrBootDrive - 0x80, Device, 10);
 		strcat(BootPath, "(");
 		strcat(BootPath, Device);
 		strcat(BootPath, ")");

Modified: trunk/reactos/boot/freeldr/freeldr/include/disk.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/include/disk.h?rev=52171&r1=52170&r2=52171&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/disk.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/disk.h [iso-8859-1] Fri Jun 10 12:12:16 2011
@@ -123,8 +123,8 @@
 BOOLEAN	DiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); // Implemented in i386disk.c
 BOOLEAN	DiskIsDriveRemovable(ULONG DriveNumber);
 VOID	DiskStopFloppyMotor(VOID);	// Implemented in i386disk.c
-extern ULONG BootDrive;
-extern ULONG BootPartition;
+extern ULONG FrldrBootDrive;
+extern ULONG FrldrBootPartition;
 
 BOOLEAN DiskGetBootPath(char *BootPath, unsigned Size);
 




More information about the Ros-diffs mailing list