2005-12-03 Marco Gerards <mgerards@xs4all.nl>

* conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
	and `cd' to make sure the filename is not prefixed with a
	directory name.
	(pkgdata_MODULES): Add `gpt.mod'.
	(gpt_mod_SOURCES): New variable.
	(gpt_mod_CFLAGS): Likewise.
	(gpt_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.

	* include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
	New macro.

	* partmap/gpt.c: New file.

	* partmap/pc.c (pc_partition_map_iterate): Don't continue when a
	GPT partition map is detected.
This commit is contained in:
marco_g 2005-12-03 17:54:55 +00:00
parent 41730ed990
commit b04216abba
8 changed files with 327 additions and 13 deletions

View file

@ -140,6 +140,10 @@ pc_partition_map_iterate (grub_disk_t disk,
"partition %d: flag 0x%x, type 0x%x, start 0x%lx, len 0x%lx\n",
p.index, e->flag, pcdata.dos_type, p.start, p.len);
/* If this is a GPT partition, this MBR is just a dummy. */
if (e->type == GRUB_PC_PARTITION_TYPE_GPT_DISK && p.index == 0)
return grub_error (GRUB_ERR_BAD_PART_TABLE, "dummy mbr");
/* If this partition is a normal one, call the hook. */
if (! grub_pc_partition_is_empty (e->type)
&& ! grub_pc_partition_is_extended (e->type))