diff --git a/ChangeLog b/ChangeLog index 6cf11a6c8..ba1fdfef9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,53 @@ +2009-08-23 Robert Millan + + * partmap/pc.c: Rename to ... + * partmap/msdos.c: ... this. Update all users. + (grub_pc_partition_map): Rename to ... + (grub_msdos_partition_map): ... this. Update all users. + + * parttool/pcpart.c: Rename to ... + * parttool/msdospart.c: ... this. Update all users. + + * include/grub/pc_partition.h: Rename to ... + * include/grub/msdos_partition.h: ... this. Update all users. + (grub_pc_partition_bsd_entry): Rename to ... + (grub_msdos_partition_bsd_entry): ... this. Update all users. + (grub_pc_partition_disk_label): Rename to ... + (grub_msdos_partition_disk_label): ... this. Update all users. + (grub_pc_partition_entry): Rename to ... + (grub_msdos_partition_entry): ... this. Update all users. + (grub_pc_partition_mbr): Rename to ... + (grub_msdos_partition_mbr): ... this. Update all users. + (grub_pc_partition): Rename to ... + (grub_msdos_partition): ... this. Update all users. + (grub_pc_partition_is_empty): Rename to ... + (grub_msdos_partition_is_empty): ... this. Update all users. + (grub_pc_partition_is_extended): Rename to ... + (grub_msdos_partition_is_extended): ... this. Update all users. + (grub_pc_partition_is_bsd): Rename to ... + (grub_msdos_partition_is_bsd): ... this. Update all users. + + * conf/common.rmk (amiga_mod_SOURCES, amiga_mod_CFLAGS) + (amiga_mod_LDFLAGS, apple_mod_SOURCES, apple_mod_CFLAGS) + (apple_mod_LDFLAGS, msdos_mod_SOURCES, msdos_mod_CFLAGS) + (msdos_mod_LDFLAGS, sun_mod_SOURCES, sun_mod_CFLAGS) + (sun_mod_LDFLAGS, acorn_mod_SOURCES, acorn_mod_CFLAGS) + (acorn_mod_LDFLAGS, gpt_mod_SOURCES, gpt_mod_CFLAGS) + (gpt_mod_LDFLAGS): Rename to ... + (part_amiga_mod_SOURCES, part_amiga_mod_CFLAGS, part_amiga_mod_LDFLAGS) + (part_apple_mod_SOURCES, part_apple_mod_CFLAGS, part_apple_mod_LDFLAGS) + (part_msdos_mod_SOURCES, part_msdos_mod_CFLAGS, part_msdos_mod_LDFLAGS) + (part_sun_mod_SOURCES, part_sun_mod_CFLAGS, part_sun_mod_LDFLAGS) + (part_acorn_mod_SOURCES, part_acorn_mod_CFLAGS, part_acorn_mod_LDFLAGS) + (part_gpt_mod_SOURCES, part_gpt_mod_CFLAGS) + (part_gpt_mod_LDFLAGS): ... this. + (pkglib_MODULES): Prefix partition modules with `part_'. Rename + `pcpart.mod' to `msdospart.mod'. + (pcpart_mod_SOURCES, pcpart_mod_CFLAGS, pcpart_mod_LDFLAGS): Rename + to ... + (msdospart_mod_SOURCES, msdospart_mod_CFLAGS) + (msdospart_mod_LDFLAGS): ... this. + 2009-08-23 Vladimir Serbinenko * loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd. diff --git a/commands/gptsync.c b/commands/gptsync.c index 600309f70..a603746a2 100644 --- a/commands/gptsync.c +++ b/commands/gptsync.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -60,7 +60,7 @@ grub_cmd_gptsync (grub_command_t cmd __attribute__ ((unused)), int argc, char **args) { grub_device_t dev; - struct grub_pc_partition_mbr mbr; + struct grub_msdos_partition_mbr mbr; struct grub_partition *partition; grub_disk_addr_t first_sector; int numactive = 0; diff --git a/conf/common.rmk b/conf/common.rmk index b0d3785d1..c33e8000a 100644 --- a/conf/common.rmk +++ b/conf/common.rmk @@ -19,7 +19,7 @@ grub_probe_SOURCES = util/grub-probe.c \ fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/befs.c fs/tar.c \ \ - partmap/pc.c partmap/apple.c partmap/sun.c partmap/gpt.c\ + partmap/msdos.c partmap/apple.c partmap/sun.c partmap/gpt.c\ kern/fs.c kern/env.c fs/fshelp.c \ disk/raid.c disk/mdraid_linux.c disk/lvm.c grub_probe_init.c @@ -40,7 +40,7 @@ grub_fstest_SOURCES = util/grub-fstest.c util/hostfs.c util/misc.c \ fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/befs.c fs/tar.c \ \ - kern/partition.c partmap/pc.c partmap/apple.c partmap/sun.c \ + kern/partition.c partmap/msdos.c partmap/apple.c partmap/sun.c \ partmap/gpt.c \ kern/fs.c kern/env.c fs/fshelp.c disk/raid.c \ disk/raid5_recover.c disk/raid6_recover.c \ @@ -285,37 +285,36 @@ befs_mod_CFLAGS = $(COMMON_CFLAGS) befs_mod_LDFLAGS = $(COMMON_LDFLAGS) # Partition maps. -pkglib_MODULES += amiga.mod apple.mod pc.mod sun.mod acorn.mod gpt.mod -# For amiga.mod -amiga_mod_SOURCES = partmap/amiga.c -amiga_mod_CFLAGS = $(COMMON_CFLAGS) -amiga_mod_LDFLAGS = $(COMMON_LDFLAGS) +pkglib_MODULES += part_amiga.mod +part_amiga_mod_SOURCES = partmap/amiga.c +part_amiga_mod_CFLAGS = $(COMMON_CFLAGS) +part_amiga_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For apple.mod -apple_mod_SOURCES = partmap/apple.c -apple_mod_CFLAGS = $(COMMON_CFLAGS) -apple_mod_LDFLAGS = $(COMMON_LDFLAGS) +pkglib_MODULES += part_apple.mod +part_apple_mod_SOURCES = partmap/apple.c +part_apple_mod_CFLAGS = $(COMMON_CFLAGS) +part_apple_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For pc.mod -pc_mod_SOURCES = partmap/pc.c -pc_mod_CFLAGS = $(COMMON_CFLAGS) -pc_mod_LDFLAGS = $(COMMON_LDFLAGS) +pkglib_MODULES += part_msdos.mod +part_msdos_mod_SOURCES = partmap/msdos.c +part_msdos_mod_CFLAGS = $(COMMON_CFLAGS) +part_msdos_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For sun.mod -sun_mod_SOURCES = partmap/sun.c -sun_mod_CFLAGS = $(COMMON_CFLAGS) -sun_mod_LDFLAGS = $(COMMON_LDFLAGS) +pkglib_MODULES += part_sun.mod +part_sun_mod_SOURCES = partmap/sun.c +part_sun_mod_CFLAGS = $(COMMON_CFLAGS) +part_sun_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For acorn.mod -acorn_mod_SOURCES = partmap/acorn.c -acorn_mod_CFLAGS = $(COMMON_CFLAGS) -acorn_mod_LDFLAGS = $(COMMON_LDFLAGS) +pkglib_MODULES += part_acorn.mod +part_acorn_mod_SOURCES = partmap/acorn.c +part_acorn_mod_CFLAGS = $(COMMON_CFLAGS) +part_acorn_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For gpt.mod -gpt_mod_SOURCES = partmap/gpt.c -gpt_mod_CFLAGS = $(COMMON_CFLAGS) -gpt_mod_LDFLAGS = $(COMMON_LDFLAGS) +pkglib_MODULES += part_gpt.mod +part_gpt_mod_SOURCES = partmap/gpt.c +part_gpt_mod_CFLAGS = $(COMMON_CFLAGS) +part_gpt_mod_LDFLAGS = $(COMMON_LDFLAGS) # Special disk structures and generic drivers @@ -363,7 +362,7 @@ pkglib_MODULES += minicmd.mod extcmd.mod hello.mod handler.mod \ fs_file.mod fs_uuid.mod configfile.mod echo.mod \ terminfo.mod test.mod blocklist.mod hexdump.mod \ read.mod sleep.mod loadenv.mod crc.mod parttool.mod \ - pcpart.mod memrw.mod normal.mod sh.mod lua.mod \ + msdospart.mod memrw.mod normal.mod sh.mod lua.mod \ gptsync.mod true.mod probe.mod # For gptsync.mod. @@ -391,10 +390,10 @@ parttool_mod_SOURCES = commands/parttool.c parttool_mod_CFLAGS = $(COMMON_CFLAGS) parttool_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For pcpart.mod. -pcpart_mod_SOURCES = parttool/pcpart.c -pcpart_mod_CFLAGS = $(COMMON_CFLAGS) -pcpart_mod_LDFLAGS = $(COMMON_LDFLAGS) +# For msdospart.mod. +msdospart_mod_SOURCES = parttool/msdospart.c +msdospart_mod_CFLAGS = $(COMMON_CFLAGS) +msdospart_mod_LDFLAGS = $(COMMON_LDFLAGS) # For handler.mod. handler_mod_SOURCES = commands/handler.c diff --git a/conf/i386-coreboot.rmk b/conf/i386-coreboot.rmk index ce2576b95..de3004140 100644 --- a/conf/i386-coreboot.rmk +++ b/conf/i386-coreboot.rmk @@ -32,7 +32,7 @@ kernel_img_SOURCES = kern/i386/coreboot/startup.S \ symlist.c kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ - partition.h pc_partition.h reader.h symbol.h term.h time.h types.h \ + partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \ machine/boot.h machine/console.h machine/init.h \ machine/memory.h machine/loader.h list.h handler.h command.h kernel_img_CFLAGS = $(COMMON_CFLAGS) @@ -75,7 +75,7 @@ kernel_img_SOURCES = kern/i386/qemu/startup.S \ symlist.c kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ - partition.h pc_partition.h reader.h symbol.h term.h time.h types.h \ + partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \ machine/boot.h machine/console.h machine/init.h \ machine/memory.h machine/loader.h list.h handler.h command.h kernel_img_CFLAGS = $(COMMON_CFLAGS) -DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR) @@ -134,14 +134,14 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ normal/color.c \ script/sh/main.c script/sh/execute.c script/sh/function.c \ script/sh/lexer.c script/sh/script.c grub_script.tab.c \ - partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \ + partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \ partmap/acorn.c partmap/gpt.c \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \ \ disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ - commands/parttool.c parttool/pcpart.c \ + commands/parttool.c parttool/msdospart.c \ grub_emu_init.c grub_emu_LDFLAGS = $(LIBCURSES) diff --git a/conf/i386-efi.rmk b/conf/i386-efi.rmk index 6e3cbcf6d..372d8fc58 100644 --- a/conf/i386-efi.rmk +++ b/conf/i386-efi.rmk @@ -23,7 +23,7 @@ util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile #grub_setup_SOURCES = util/i386/pc/grub-setup.c util/hostdisk.c \ # util/misc.c util/getroot.c kern/device.c kern/disk.c \ # kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c \ -# fs/sfs.c kern/parser.c kern/partition.c partmap/pc.c \ +# fs/sfs.c kern/parser.c kern/partition.c partmap/msdos.c \ # fs/ufs.c fs/ufs2.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c \ # kern/fs.c kern/env.c fs/fshelp.c @@ -61,14 +61,14 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ normal/color.c \ script/sh/main.c script/sh/execute.c script/sh/function.c \ script/sh/lexer.c script/sh/script.c grub_script.tab.c \ - partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \ + partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \ partmap/acorn.c partmap/gpt.c \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \ \ disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ - commands/parttool.c parttool/pcpart.c \ + commands/parttool.c parttool/msdospart.c \ grub_emu_init.c grub_emu_LDFLAGS = $(LIBCURSES) @@ -100,7 +100,7 @@ kernel_mod_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \ kern/generic/millisleep.c kernel_mod_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ - partition.h pc_partition.h reader.h symbol.h term.h time.h types.h \ + partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \ efi/efi.h efi/time.h efi/disk.h i386/pit.h list.h handler.h command.h kernel_mod_CFLAGS = $(COMMON_CFLAGS) kernel_mod_ASFLAGS = $(COMMON_ASFLAGS) diff --git a/conf/i386-ieee1275.rmk b/conf/i386-ieee1275.rmk index 65d1c6bde..98aaf5849 100644 --- a/conf/i386-ieee1275.rmk +++ b/conf/i386-ieee1275.rmk @@ -31,7 +31,7 @@ kernel_img_SOURCES = kern/i386/ieee1275/startup.S \ symlist.c kernel_img_HEADERS = cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ - partition.h pc_partition.h reader.h symbol.h term.h time.h types.h \ + partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \ ieee1275/ieee1275.h machine/kernel.h machine/loader.h machine/memory.h \ list.h handler.h command.h kernel_img_CFLAGS = $(COMMON_CFLAGS) @@ -88,7 +88,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ normal/color.c \ script/sh/main.c script/sh/execute.c script/sh/function.c \ script/sh/lexer.c script/sh/script.c grub_script.tab.c \ - partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \ + partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \ partmap/acorn.c partmap/gpt.c \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \ diff --git a/conf/i386-pc.rmk b/conf/i386-pc.rmk index 0ef5e4730..13aaa2618 100644 --- a/conf/i386-pc.rmk +++ b/conf/i386-pc.rmk @@ -61,7 +61,7 @@ kernel_img_SOURCES = kern/i386/pc/startup.S \ symlist.c kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ - partition.h pc_partition.h reader.h symbol.h term.h time.h types.h \ + partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \ machine/biosdisk.h machine/boot.h machine/console.h machine/init.h \ machine/memory.h machine/loader.h machine/vga.h machine/vbe.h \ machine/kernel.h machine/pxe.h i386/pit.h list.h handler.h command.h @@ -104,7 +104,7 @@ grub_setup_SOURCES = util/i386/pc/grub-setup.c util/hostdisk.c \ fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/befs.c fs/tar.c \ \ - partmap/pc.c partmap/gpt.c \ + partmap/msdos.c partmap/gpt.c \ \ disk/raid.c disk/mdraid_linux.c disk/lvm.c \ util/raid.c util/lvm.c \ @@ -140,7 +140,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ normal/menu_text.c \ script/sh/main.c script/sh/execute.c script/sh/function.c \ script/sh/lexer.c script/sh/script.c grub_script.tab.c \ - partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \ + partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \ partmap/acorn.c partmap/gpt.c \ \ fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \ @@ -153,7 +153,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ \ disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ - commands/parttool.c parttool/pcpart.c \ + commands/parttool.c parttool/msdospart.c \ grub_emu_init.c grub_emu_LDFLAGS = $(LIBCURSES) diff --git a/conf/powerpc-ieee1275.rmk b/conf/powerpc-ieee1275.rmk index c30f61a48..c1c04e484 100644 --- a/conf/powerpc-ieee1275.rmk +++ b/conf/powerpc-ieee1275.rmk @@ -16,7 +16,7 @@ DEFSYMFILES += kernel_syms.lst kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h reader.h \ symbol.h term.h time.h types.h powerpc/libgcc.h loader.h partition.h \ - pc_partition.h ieee1275/ieee1275.h machine/kernel.h handler.h list.h \ + msdos_partition.h ieee1275/ieee1275.h machine/kernel.h handler.h list.h \ command.h symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh @@ -69,14 +69,14 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ normal/color.c \ script/sh/main.c script/sh/execute.c script/sh/function.c \ script/sh/lexer.c script/sh/script.c \ - partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \ + partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \ partmap/acorn.c \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \ \ disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ - commands/parttool.c parttool/pcpart.c \ + commands/parttool.c parttool/msdospart.c \ grub_script.tab.c grub_emu_init.c grub_emu_LDFLAGS = $(LIBCURSES) diff --git a/conf/sparc64-ieee1275.rmk b/conf/sparc64-ieee1275.rmk index b26496d20..c3ecba28f 100644 --- a/conf/sparc64-ieee1275.rmk +++ b/conf/sparc64-ieee1275.rmk @@ -28,7 +28,7 @@ DEFSYMFILES += kernel_syms.lst kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ - partition.h pc_partition.h reader.h symbol.h term.h time.h types.h \ + partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \ list.h handler.h command.h \ sparc64/libgcc.h ieee1275/ieee1275.h machine/kernel.h \ sparc64/ieee1275/ieee1275.h @@ -80,7 +80,7 @@ grub_setup_SOURCES = util/sparc64/ieee1275/grub-setup.c util/hostdisk.c \ fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/befs.c fs/tar.c \ \ - partmap/amiga.c partmap/apple.c partmap/pc.c \ + partmap/amiga.c partmap/apple.c partmap/msdos.c \ partmap/sun.c partmap/acorn.c \ \ disk/raid.c disk/mdraid_linux.c disk/lvm.c \ @@ -126,14 +126,14 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ normal/color.c \ script/sh/main.c script/sh/execute.c script/sh/function.c \ script/sh/lexer.c script/sh/script.c \ - partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \ + partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \ partmap/acorn.c \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \ \ disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ - commands/parttool.c parttool/pcpart.c \ + commands/parttool.c parttool/msdospart.c \ grub_script.tab.c grub_emu_init.c grub_emu_LDFLAGS = $(LIBCURSES) diff --git a/conf/x86_64-efi.rmk b/conf/x86_64-efi.rmk index 71a90ce18..c914fbf19 100644 --- a/conf/x86_64-efi.rmk +++ b/conf/x86_64-efi.rmk @@ -22,7 +22,7 @@ grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \ #grub_setup_SOURCES = util/i386/pc/grub-setup.c util/hostdisk.c \ # util/misc.c util/getroot.c kern/device.c kern/disk.c \ # kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c \ -# fs/sfs.c kern/parser.c kern/partition.c partmap/pc.c \ +# fs/sfs.c kern/parser.c kern/partition.c partmap/msdos.c \ # fs/ufs.c fs/ufs2.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c \ # kern/fs.c kern/env.c fs/fshelp.c @@ -58,14 +58,14 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \ normal/color.c \ script/sh/main.c script/sh/execute.c script/sh/function.c \ script/sh/lexer.c script/sh/script.c grub_script.tab.c \ - partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c \ + partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c \ partmap/acorn.c partmap/gpt.c \ util/console.c util/hostfs.c util/grub-emu.c util/misc.c \ util/hostdisk.c util/getroot.c \ \ disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \ disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c \ - commands/parttool.c parttool/pcpart.c \ + commands/parttool.c parttool/msdospart.c \ grub_emu_init.c grub_emu_LDFLAGS = $(LIBCURSES) @@ -97,7 +97,7 @@ kernel_mod_SOURCES = kern/x86_64/efi/startup.S kern/x86_64/efi/callwrap.S \ term/efi/console.c disk/efi/efidisk.c kernel_mod_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ - partition.h pc_partition.h reader.h symbol.h term.h time.h types.h \ + partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \ efi/efi.h efi/time.h efi/disk.h machine/loader.h i386/pit.h list.h \ handler.h command.h kernel_mod_CFLAGS = $(COMMON_CFLAGS) diff --git a/include/grub/pc_partition.h b/include/grub/msdos_partition.h similarity index 93% rename from include/grub/pc_partition.h rename to include/grub/msdos_partition.h index 67c312e64..273d8c95e 100644 --- a/include/grub/pc_partition.h +++ b/include/grub/msdos_partition.h @@ -99,7 +99,7 @@ #define GRUB_PC_PARTITION_OPENBSD_TYPE_RAID 19 /* The BSD partition entry. */ -struct grub_pc_partition_bsd_entry +struct grub_msdos_partition_bsd_entry { grub_uint32_t size; grub_uint32_t offset; @@ -110,7 +110,7 @@ struct grub_pc_partition_bsd_entry } __attribute__ ((packed)); /* The BSD disk label. Only define members useful for GRUB. */ -struct grub_pc_partition_disk_label +struct grub_msdos_partition_disk_label { grub_uint32_t magic; grub_uint8_t padding[128]; @@ -119,11 +119,11 @@ struct grub_pc_partition_disk_label grub_uint16_t num_partitions; grub_uint32_t boot_size; grub_uint32_t superblock_size; - struct grub_pc_partition_bsd_entry entries[GRUB_PC_PARTITION_BSD_MAX_ENTRIES]; + struct grub_msdos_partition_bsd_entry entries[GRUB_PC_PARTITION_BSD_MAX_ENTRIES]; } __attribute__ ((packed)); /* The partition entry. */ -struct grub_pc_partition_entry +struct grub_msdos_partition_entry { /* If active, 0x80, otherwise, 0x00. */ grub_uint8_t flag; @@ -155,20 +155,20 @@ struct grub_pc_partition_entry } __attribute__ ((packed)); /* The structure of MBR. */ -struct grub_pc_partition_mbr +struct grub_msdos_partition_mbr { /* The code area (actually, including BPB). */ grub_uint8_t code[446]; /* Four partition entries. */ - struct grub_pc_partition_entry entries[4]; + struct grub_msdos_partition_entry entries[4]; /* The signature 0xaa55. */ grub_uint16_t signature; } __attribute__ ((packed)); -struct grub_pc_partition +struct grub_msdos_partition { /* The DOS partition number. */ int dos_part; @@ -187,13 +187,13 @@ struct grub_pc_partition }; static inline int -grub_pc_partition_is_empty (int type) +grub_msdos_partition_is_empty (int type) { return (type == GRUB_PC_PARTITION_TYPE_NONE); } static inline int -grub_pc_partition_is_extended (int type) +grub_msdos_partition_is_extended (int type) { return (type == GRUB_PC_PARTITION_TYPE_EXTENDED || type == GRUB_PC_PARTITION_TYPE_WIN95_EXTENDED @@ -201,7 +201,7 @@ grub_pc_partition_is_extended (int type) } static inline int -grub_pc_partition_is_bsd (int type) +grub_msdos_partition_is_bsd (int type) { return (type == GRUB_PC_PARTITION_TYPE_FREEBSD || type == GRUB_PC_PARTITION_TYPE_OPENBSD diff --git a/include/grub/partition.h b/include/grub/partition.h index 37c5f2403..d35658cdd 100644 --- a/include/grub/partition.h +++ b/include/grub/partition.h @@ -84,8 +84,8 @@ void EXPORT_FUNC(grub_partition_map_register) (grub_partition_map_t partmap); void EXPORT_FUNC(grub_partition_map_unregister) (grub_partition_map_t partmap); #ifdef GRUB_UTIL -void grub_pc_partition_map_init (void); -void grub_pc_partition_map_fini (void); +void grub_msdos_partition_map_init (void); +void grub_msdos_partition_map_fini (void); void grub_amiga_partition_map_init (void); void grub_amiga_partition_map_fini (void); void grub_apple_partition_map_init (void); diff --git a/partmap/gpt.c b/partmap/gpt.c index d646d41b8..e860f35da 100644 --- a/partmap/gpt.c +++ b/partmap/gpt.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include static grub_uint8_t grub_gpt_magic[8] = @@ -45,7 +45,7 @@ gpt_partition_map_iterate (grub_disk_t disk, struct grub_gpt_header gpt; struct grub_gpt_partentry entry; struct grub_disk raw; - struct grub_pc_partition_mbr mbr; + struct grub_msdos_partition_mbr mbr; grub_uint64_t entries; unsigned int i; int last_offset = 0; diff --git a/partmap/pc.c b/partmap/msdos.c similarity index 86% rename from partmap/pc.c rename to partmap/msdos.c index 6a2efd21e..9fc620df0 100644 --- a/partmap/pc.c +++ b/partmap/msdos.c @@ -18,13 +18,13 @@ */ #include -#include +#include #include #include #include #include -static struct grub_partition_map grub_pc_partition_map; +static struct grub_partition_map grub_msdos_partition_map; /* Parse the partition representation in STR and return a partition. */ @@ -32,7 +32,7 @@ static grub_partition_t grub_partition_parse (const char *str) { grub_partition_t p; - struct grub_pc_partition *pcdata; + struct grub_msdos_partition *pcdata; char *s = (char *) str; @@ -40,12 +40,12 @@ grub_partition_parse (const char *str) if (! p) return 0; - pcdata = (struct grub_pc_partition *) grub_malloc (sizeof (*pcdata)); + pcdata = (struct grub_msdos_partition *) grub_malloc (sizeof (*pcdata)); if (! pcdata) goto fail; p->data = pcdata; - p->partmap = &grub_pc_partition_map; + p->partmap = &grub_msdos_partition_map; /* Initialize some of the fields with invalid values. */ pcdata->bsd_part = pcdata->dos_type = pcdata->bsd_type = p->index = -1; @@ -93,9 +93,9 @@ pc_partition_map_iterate (grub_disk_t disk, const grub_partition_t partition)) { struct grub_partition p; - struct grub_pc_partition pcdata; - struct grub_pc_partition_mbr mbr; - struct grub_pc_partition_disk_label label; + struct grub_msdos_partition pcdata; + struct grub_msdos_partition_mbr mbr; + struct grub_msdos_partition_disk_label label; struct grub_disk raw; /* Enforce raw disk access. */ @@ -106,12 +106,12 @@ pc_partition_map_iterate (grub_disk_t disk, pcdata.ext_offset = 0; pcdata.dos_part = -1; p.data = &pcdata; - p.partmap = &grub_pc_partition_map; + p.partmap = &grub_msdos_partition_map; while (1) { int i; - struct grub_pc_partition_entry *e; + struct grub_msdos_partition_entry *e; /* Read the MBR. */ if (grub_disk_read (&raw, p.offset, 0, sizeof (mbr), &mbr)) @@ -147,8 +147,8 @@ pc_partition_map_iterate (grub_disk_t disk, 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)) + if (! grub_msdos_partition_is_empty (e->type) + && ! grub_msdos_partition_is_extended (e->type)) { pcdata.dos_part++; @@ -156,7 +156,7 @@ pc_partition_map_iterate (grub_disk_t disk, return 1; /* Check if this is a BSD partition. */ - if (grub_pc_partition_is_bsd (e->type)) + if (grub_msdos_partition_is_bsd (e->type)) { /* Check if the BSD label is within the DOS partition. */ if (p.len <= GRUB_PC_PARTITION_BSD_LABEL_SECTOR) @@ -186,7 +186,7 @@ pc_partition_map_iterate (grub_disk_t disk, pcdata.bsd_part < grub_cpu_to_le16 (label.num_partitions); pcdata.bsd_part++) { - struct grub_pc_partition_bsd_entry *be + struct grub_msdos_partition_bsd_entry *be = label.entries + pcdata.bsd_part; p.start = grub_le_to_cpu32 (be->offset); @@ -210,7 +210,7 @@ pc_partition_map_iterate (grub_disk_t disk, { e = mbr.entries + i; - if (grub_pc_partition_is_extended (e->type)) + if (grub_msdos_partition_is_extended (e->type)) { p.offset = pcdata.ext_offset + grub_le_to_cpu32 (e->start); if (! pcdata.ext_offset) @@ -234,14 +234,14 @@ static grub_partition_t pc_partition_map_probe (grub_disk_t disk, const char *str) { grub_partition_t p; - struct grub_pc_partition *pcdata; + struct grub_msdos_partition *pcdata; auto int find_func (grub_disk_t d, const grub_partition_t partition); int find_func (grub_disk_t d __attribute__ ((unused)), const grub_partition_t partition) { - struct grub_pc_partition *partdata = partition->data; + struct grub_msdos_partition *partdata = partition->data; if ((pcdata->dos_part == partdata->dos_part || pcdata->dos_part == -1) && pcdata->bsd_part == partdata->bsd_part) @@ -283,7 +283,7 @@ static char * pc_partition_map_get_name (const grub_partition_t p) { char *name; - struct grub_pc_partition *pcdata = p->data; + struct grub_msdos_partition *pcdata = p->data; name = grub_malloc (13); if (! name) @@ -301,9 +301,9 @@ pc_partition_map_get_name (const grub_partition_t p) /* Partition map type. */ -static struct grub_partition_map grub_pc_partition_map = +static struct grub_partition_map grub_msdos_partition_map = { - .name = "pc_partition_map", + .name = "msdos_partition_map", .iterate = pc_partition_map_iterate, .probe = pc_partition_map_probe, .get_name = pc_partition_map_get_name @@ -311,10 +311,10 @@ static struct grub_partition_map grub_pc_partition_map = GRUB_MOD_INIT(pc_partition_map) { - grub_partition_map_register (&grub_pc_partition_map); + grub_partition_map_register (&grub_msdos_partition_map); } GRUB_MOD_FINI(pc_partition_map) { - grub_partition_map_unregister (&grub_pc_partition_map); + grub_partition_map_unregister (&grub_msdos_partition_map); } diff --git a/parttool/pcpart.c b/parttool/msdospart.c similarity index 91% rename from parttool/pcpart.c rename to parttool/msdospart.c index 6876d0d58..1bb9cd3e1 100644 --- a/parttool/pcpart.c +++ b/parttool/msdospart.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -42,7 +42,7 @@ static grub_err_t grub_pcpart_boot (const grub_device_t dev, { int i, index; grub_partition_t part; - struct grub_pc_partition_mbr mbr; + struct grub_msdos_partition_mbr mbr; if (dev->disk->partition->offset) return grub_error (GRUB_ERR_BAD_ARGUMENT, "not a primary partition"); @@ -92,7 +92,7 @@ static grub_err_t grub_pcpart_type (const grub_device_t dev, int index; grub_uint8_t type; grub_partition_t part; - struct grub_pc_partition_mbr mbr; + struct grub_msdos_partition_mbr mbr; index = dev->disk->partition->index; part = dev->disk->partition; @@ -119,8 +119,8 @@ static grub_err_t grub_pcpart_type (const grub_device_t dev, type &= ~GRUB_PC_PARTITION_TYPE_HIDDEN_FLAG; } - if (grub_pc_partition_is_empty (type) - || grub_pc_partition_is_extended (type)) + if (grub_msdos_partition_is_empty (type) + || grub_msdos_partition_is_extended (type)) { dev->disk->partition = part; return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid type"); @@ -140,10 +140,10 @@ static grub_err_t grub_pcpart_type (const grub_device_t dev, GRUB_MOD_INIT (pcpart) { - activate_table_handle = grub_parttool_register ("pc_partition_map", + activate_table_handle = grub_parttool_register ("msdos_partition_map", grub_pcpart_boot, grub_pcpart_bootargs); - type_table_handle = grub_parttool_register ("pc_partition_map", + type_table_handle = grub_parttool_register ("msdos_partition_map", grub_pcpart_type, grub_pcpart_typeargs); diff --git a/util/grub-probe.c b/util/grub-probe.c index 0088028f5..7c63f64ef 100644 --- a/util/grub-probe.c +++ b/util/grub-probe.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/util/hostdisk.c b/util/hostdisk.c index fdf35148f..8a3e2ef1f 100644 --- a/util/hostdisk.c +++ b/util/hostdisk.c @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include @@ -947,9 +947,9 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev) int find_partition (grub_disk_t disk __attribute__ ((unused)), const grub_partition_t partition) { - struct grub_pc_partition *pcdata = NULL; + struct grub_msdos_partition *pcdata = NULL; - if (strcmp (partition->partmap->name, "pc_partition_map") == 0) + if (strcmp (partition->partmap->name, "msdos_partition_map") == 0) pcdata = partition->data; if (pcdata) diff --git a/util/i386/pc/grub-setup.c b/util/i386/pc/grub-setup.c index 92c69ef15..0dc2e2c31 100644 --- a/util/i386/pc/grub-setup.c +++ b/util/i386/pc/grub-setup.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -121,14 +121,14 @@ setup (const char *dir, int NESTED_FUNC_ATTR find_usable_region_msdos (grub_disk_t disk __attribute__ ((unused)), const grub_partition_t p) { - struct grub_pc_partition *pcdata = p->data; + struct grub_msdos_partition *pcdata = p->data; /* There's always an embed region, and it starts right after the MBR. */ embed_region.start = 1; /* For its end offset, include as many dummy partitions as we can. */ - if (! grub_pc_partition_is_empty (pcdata->dos_type) - && ! grub_pc_partition_is_bsd (pcdata->dos_type) + if (! grub_msdos_partition_is_empty (pcdata->dos_type) + && ! grub_msdos_partition_is_bsd (pcdata->dos_type) && embed_region.end > p->start) embed_region.end = p->start; @@ -279,9 +279,9 @@ setup (const char *dir, if (root_dev->disk->partition) { if (strcmp (root_dev->disk->partition->partmap->name, - "pc_partition_map") == 0) + "msdos_partition_map") == 0) { - struct grub_pc_partition *pcdata = + struct grub_msdos_partition *pcdata = root_dev->disk->partition->data; dos_part = pcdata->dos_part; bsd_part = pcdata->bsd_part; @@ -338,12 +338,12 @@ setup (const char *dir, goto unable_to_embed; } - grub_partition_iterate (dest_dev->disk, (strcmp (dest_partmap, "pc_partition_map") ? + grub_partition_iterate (dest_dev->disk, (strcmp (dest_partmap, "msdos_partition_map") ? find_usable_region_gpt : find_usable_region_msdos)); if (embed_region.end == embed_region.start) { - if (! strcmp (dest_partmap, "pc_partition_map")) + if (! strcmp (dest_partmap, "msdos_partition_map")) grub_util_warn ("This msdos-style partition label has no post-MBR gap; embedding won't be possible!"); else grub_util_warn ("This GPT partition label has no BIOS Boot Partition; embedding won't be possible!"); diff --git a/util/sparc64/ieee1275/grub-setup.c b/util/sparc64/ieee1275/grub-setup.c index 9509eb30b..7008147bf 100644 --- a/util/sparc64/ieee1275/grub-setup.c +++ b/util/sparc64/ieee1275/grub-setup.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include