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

@ -94,7 +94,7 @@ setup (const char *dir,
grub_uint16_t core_sectors;
grub_device_t root_dev, dest_dev;
const char *dest_partmap;
grub_uint8_t *boot_drive, *root_drive;
grub_uint8_t *boot_drive;
grub_disk_addr_t *kernel_sector;
grub_uint16_t *boot_drive_check;
struct boot_blocklist *first_block, *block;
@ -207,7 +207,6 @@ setup (const char *dir,
/* Set the addresses of variables in the boot image. */
boot_drive = (grub_uint8_t *) (boot_img + GRUB_BOOT_MACHINE_BOOT_DRIVE);
root_drive = (grub_uint8_t *) (boot_img + GRUB_BOOT_MACHINE_ROOT_DRIVE);
kernel_sector = (grub_disk_addr_t *) (boot_img
+ GRUB_BOOT_MACHINE_KERNEL_SECTOR);
boot_drive_check = (grub_uint16_t *) (boot_img
@ -379,7 +378,6 @@ setup (const char *dir,
/* FIXME: can this be skipped? */
*boot_drive = 0xFF;
*root_drive = 0xFF;
*kernel_sector = grub_cpu_to_le64 (embed_region.start);
@ -513,7 +511,6 @@ unable_to_embed:
/* FIXME: can this be skipped? */
*boot_drive = 0xFF;
*root_drive = 0xFF;
*install_dos_part = grub_cpu_to_le32 (dos_part);
*install_bsd_part = grub_cpu_to_le32 (bsd_part);