2009-06-16 Pavel Roskin <proski@gnu.org>

* boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
	boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
	save %dx, we only need %dl and we never change it.
	* boot/i386/pc/cdboot.S: Don't set the root drive.
	* boot/i386/pc/pxeboot.S: Likewise.
	* include/grub/i386/pc/boot.h: Remove
	GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
	GRUB_BOOT_MACHINE_DRIVE_CHECK.
	* include/grub/i386/pc/kernel.h: Remove grub_root_drive.
	* kern/i386/pc/init.c (make_install_device): Remove references
	to grub_root_drive.
	* kern/i386/pc/startup.S: Likewise.
	* util/i386/pc/grub-setup.c (setup): Don't set root_drive.
This commit is contained in:
proski 2009-06-15 23:25:38 +00:00
parent 693fe63766
commit 3ef17a2ebf
9 changed files with 27 additions and 36 deletions

View file

@ -60,13 +60,10 @@ make_install_device (void)
if (grub_prefix[0] != '(')
{
/* If the root drive is not set explicitly, assume that it is identical
to the boot drive. */
if (grub_root_drive == 0xFF)
grub_root_drive = grub_boot_drive;
grub_sprintf (dev, "(%cd%u", (grub_root_drive & 0x80) ? 'h' : 'f',
grub_root_drive & 0x7f);
/* No hardcoded root partition - make it from the boot drive and the
partition number encoded at the install time. */
grub_sprintf (dev, "(%cd%u", (grub_boot_drive & 0x80) ? 'h' : 'f',
grub_boot_drive & 0x7f);
if (grub_install_dos_part >= 0)
grub_sprintf (dev + grub_strlen (dev), ",%u", grub_install_dos_part + 1);

View file

@ -195,9 +195,8 @@ codestart:
sti /* we're safe again */
/* save boot and root drive references */
/* save the boot drive */
ADDR32 movb %dl, EXT_C(grub_boot_drive)
ADDR32 movb %dh, EXT_C(grub_root_drive)
/* reset disk system (%ah = 0) */
int $0x13
@ -300,9 +299,6 @@ codestart:
VARIABLE(grub_boot_drive)
.byte 0
VARIABLE(grub_root_drive)
.byte 0
.p2align 2 /* force 4-byte alignment */
/*