2009-08-23 Robert Millan <rmh.grub@aybabtu.com>
* 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.
This commit is contained in:
parent
c11fded5f2
commit
71acf5e54b
19 changed files with 164 additions and 115 deletions
50
ChangeLog
50
ChangeLog
|
@ -1,3 +1,53 @@
|
||||||
|
2009-08-23 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* 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 <phcoder@gmail.com>
|
2009-08-23 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
|
* loader/i386/bsd.c (freebsd_opts): Rewritten to use extcmd.
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <grub/dl.h>
|
#include <grub/dl.h>
|
||||||
#include <grub/device.h>
|
#include <grub/device.h>
|
||||||
#include <grub/disk.h>
|
#include <grub/disk.h>
|
||||||
#include <grub/pc_partition.h>
|
#include <grub/msdos_partition.h>
|
||||||
#include <grub/partition.h>
|
#include <grub/partition.h>
|
||||||
#include <grub/misc.h>
|
#include <grub/misc.h>
|
||||||
#include <grub/mm.h>
|
#include <grub/mm.h>
|
||||||
|
@ -60,7 +60,7 @@ grub_cmd_gptsync (grub_command_t cmd __attribute__ ((unused)),
|
||||||
int argc, char **args)
|
int argc, char **args)
|
||||||
{
|
{
|
||||||
grub_device_t dev;
|
grub_device_t dev;
|
||||||
struct grub_pc_partition_mbr mbr;
|
struct grub_msdos_partition_mbr mbr;
|
||||||
struct grub_partition *partition;
|
struct grub_partition *partition;
|
||||||
grub_disk_addr_t first_sector;
|
grub_disk_addr_t first_sector;
|
||||||
int numactive = 0;
|
int numactive = 0;
|
||||||
|
|
|
@ -19,7 +19,7 @@ grub_probe_SOURCES = util/grub-probe.c \
|
||||||
fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.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 \
|
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 \
|
kern/fs.c kern/env.c fs/fshelp.c \
|
||||||
disk/raid.c disk/mdraid_linux.c disk/lvm.c grub_probe_init.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/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 \
|
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 \
|
partmap/gpt.c \
|
||||||
kern/fs.c kern/env.c fs/fshelp.c disk/raid.c \
|
kern/fs.c kern/env.c fs/fshelp.c disk/raid.c \
|
||||||
disk/raid5_recover.c disk/raid6_recover.c \
|
disk/raid5_recover.c disk/raid6_recover.c \
|
||||||
|
@ -285,37 +285,36 @@ befs_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
befs_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
befs_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# Partition maps.
|
# Partition maps.
|
||||||
pkglib_MODULES += amiga.mod apple.mod pc.mod sun.mod acorn.mod gpt.mod
|
|
||||||
|
|
||||||
# For amiga.mod
|
pkglib_MODULES += part_amiga.mod
|
||||||
amiga_mod_SOURCES = partmap/amiga.c
|
part_amiga_mod_SOURCES = partmap/amiga.c
|
||||||
amiga_mod_CFLAGS = $(COMMON_CFLAGS)
|
part_amiga_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
amiga_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
part_amiga_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For apple.mod
|
pkglib_MODULES += part_apple.mod
|
||||||
apple_mod_SOURCES = partmap/apple.c
|
part_apple_mod_SOURCES = partmap/apple.c
|
||||||
apple_mod_CFLAGS = $(COMMON_CFLAGS)
|
part_apple_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
apple_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
part_apple_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For pc.mod
|
pkglib_MODULES += part_msdos.mod
|
||||||
pc_mod_SOURCES = partmap/pc.c
|
part_msdos_mod_SOURCES = partmap/msdos.c
|
||||||
pc_mod_CFLAGS = $(COMMON_CFLAGS)
|
part_msdos_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
pc_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
part_msdos_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For sun.mod
|
pkglib_MODULES += part_sun.mod
|
||||||
sun_mod_SOURCES = partmap/sun.c
|
part_sun_mod_SOURCES = partmap/sun.c
|
||||||
sun_mod_CFLAGS = $(COMMON_CFLAGS)
|
part_sun_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
sun_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
part_sun_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For acorn.mod
|
pkglib_MODULES += part_acorn.mod
|
||||||
acorn_mod_SOURCES = partmap/acorn.c
|
part_acorn_mod_SOURCES = partmap/acorn.c
|
||||||
acorn_mod_CFLAGS = $(COMMON_CFLAGS)
|
part_acorn_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
acorn_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
part_acorn_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For gpt.mod
|
pkglib_MODULES += part_gpt.mod
|
||||||
gpt_mod_SOURCES = partmap/gpt.c
|
part_gpt_mod_SOURCES = partmap/gpt.c
|
||||||
gpt_mod_CFLAGS = $(COMMON_CFLAGS)
|
part_gpt_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
gpt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
part_gpt_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# Special disk structures and generic drivers
|
# 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 \
|
fs_file.mod fs_uuid.mod configfile.mod echo.mod \
|
||||||
terminfo.mod test.mod blocklist.mod hexdump.mod \
|
terminfo.mod test.mod blocklist.mod hexdump.mod \
|
||||||
read.mod sleep.mod loadenv.mod crc.mod parttool.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
|
gptsync.mod true.mod probe.mod
|
||||||
|
|
||||||
# For gptsync.mod.
|
# For gptsync.mod.
|
||||||
|
@ -391,10 +390,10 @@ parttool_mod_SOURCES = commands/parttool.c
|
||||||
parttool_mod_CFLAGS = $(COMMON_CFLAGS)
|
parttool_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
parttool_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
parttool_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For pcpart.mod.
|
# For msdospart.mod.
|
||||||
pcpart_mod_SOURCES = parttool/pcpart.c
|
msdospart_mod_SOURCES = parttool/msdospart.c
|
||||||
pcpart_mod_CFLAGS = $(COMMON_CFLAGS)
|
msdospart_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
pcpart_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
msdospart_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
# For handler.mod.
|
# For handler.mod.
|
||||||
handler_mod_SOURCES = commands/handler.c
|
handler_mod_SOURCES = commands/handler.c
|
||||||
|
|
|
@ -32,7 +32,7 @@ kernel_img_SOURCES = kern/i386/coreboot/startup.S \
|
||||||
symlist.c
|
symlist.c
|
||||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
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 \
|
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/boot.h machine/console.h machine/init.h \
|
||||||
machine/memory.h machine/loader.h list.h handler.h command.h
|
machine/memory.h machine/loader.h list.h handler.h command.h
|
||||||
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
@ -75,7 +75,7 @@ kernel_img_SOURCES = kern/i386/qemu/startup.S \
|
||||||
symlist.c
|
symlist.c
|
||||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
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 \
|
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/boot.h machine/console.h machine/init.h \
|
||||||
machine/memory.h machine/loader.h list.h handler.h command.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)
|
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 \
|
normal/color.c \
|
||||||
script/sh/main.c script/sh/execute.c script/sh/function.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 \
|
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 \
|
partmap/acorn.c partmap/gpt.c \
|
||||||
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
||||||
util/hostdisk.c util/getroot.c \
|
util/hostdisk.c util/getroot.c \
|
||||||
\
|
\
|
||||||
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
||||||
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.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_init.c
|
||||||
|
|
||||||
grub_emu_LDFLAGS = $(LIBCURSES)
|
grub_emu_LDFLAGS = $(LIBCURSES)
|
||||||
|
|
|
@ -23,7 +23,7 @@ util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile
|
||||||
#grub_setup_SOURCES = util/i386/pc/grub-setup.c util/hostdisk.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 \
|
# 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 \
|
# 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 \
|
# 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
|
# 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 \
|
normal/color.c \
|
||||||
script/sh/main.c script/sh/execute.c script/sh/function.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 \
|
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 \
|
partmap/acorn.c partmap/gpt.c \
|
||||||
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
||||||
util/hostdisk.c util/getroot.c \
|
util/hostdisk.c util/getroot.c \
|
||||||
\
|
\
|
||||||
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
||||||
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.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_init.c
|
||||||
|
|
||||||
grub_emu_LDFLAGS = $(LIBCURSES)
|
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
|
kern/generic/millisleep.c
|
||||||
kernel_mod_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
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 \
|
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
|
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_CFLAGS = $(COMMON_CFLAGS)
|
||||||
kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
|
|
|
@ -31,7 +31,7 @@ kernel_img_SOURCES = kern/i386/ieee1275/startup.S \
|
||||||
symlist.c
|
symlist.c
|
||||||
kernel_img_HEADERS = cache.h device.h disk.h dl.h elf.h elfload.h \
|
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 \
|
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 \
|
ieee1275/ieee1275.h machine/kernel.h machine/loader.h machine/memory.h \
|
||||||
list.h handler.h command.h
|
list.h handler.h command.h
|
||||||
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
@ -88,7 +88,7 @@ grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c \
|
||||||
normal/color.c \
|
normal/color.c \
|
||||||
script/sh/main.c script/sh/execute.c script/sh/function.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 \
|
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 \
|
partmap/acorn.c partmap/gpt.c \
|
||||||
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
||||||
util/hostdisk.c util/getroot.c \
|
util/hostdisk.c util/getroot.c \
|
||||||
|
|
|
@ -61,7 +61,7 @@ kernel_img_SOURCES = kern/i386/pc/startup.S \
|
||||||
symlist.c
|
symlist.c
|
||||||
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
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 \
|
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/biosdisk.h machine/boot.h machine/console.h machine/init.h \
|
||||||
machine/memory.h machine/loader.h machine/vga.h machine/vbe.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
|
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/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 \
|
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 \
|
disk/raid.c disk/mdraid_linux.c disk/lvm.c \
|
||||||
util/raid.c util/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 \
|
normal/menu_text.c \
|
||||||
script/sh/main.c script/sh/execute.c script/sh/function.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 \
|
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 \
|
partmap/acorn.c partmap/gpt.c \
|
||||||
\
|
\
|
||||||
fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.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/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
||||||
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.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_init.c
|
||||||
|
|
||||||
grub_emu_LDFLAGS = $(LIBCURSES)
|
grub_emu_LDFLAGS = $(LIBCURSES)
|
||||||
|
|
|
@ -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 \
|
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 \
|
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 \
|
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
|
command.h
|
||||||
|
|
||||||
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
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 \
|
normal/color.c \
|
||||||
script/sh/main.c script/sh/execute.c script/sh/function.c \
|
script/sh/main.c script/sh/execute.c script/sh/function.c \
|
||||||
script/sh/lexer.c script/sh/script.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 \
|
partmap/acorn.c \
|
||||||
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
||||||
util/hostdisk.c util/getroot.c \
|
util/hostdisk.c util/getroot.c \
|
||||||
\
|
\
|
||||||
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
||||||
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.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_script.tab.c grub_emu_init.c
|
||||||
|
|
||||||
grub_emu_LDFLAGS = $(LIBCURSES)
|
grub_emu_LDFLAGS = $(LIBCURSES)
|
||||||
|
|
|
@ -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 \
|
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 \
|
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 \
|
list.h handler.h command.h \
|
||||||
sparc64/libgcc.h ieee1275/ieee1275.h machine/kernel.h \
|
sparc64/libgcc.h ieee1275/ieee1275.h machine/kernel.h \
|
||||||
sparc64/ieee1275/ieee1275.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/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 \
|
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 \
|
partmap/sun.c partmap/acorn.c \
|
||||||
\
|
\
|
||||||
disk/raid.c disk/mdraid_linux.c disk/lvm.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 \
|
normal/color.c \
|
||||||
script/sh/main.c script/sh/execute.c script/sh/function.c \
|
script/sh/main.c script/sh/execute.c script/sh/function.c \
|
||||||
script/sh/lexer.c script/sh/script.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 \
|
partmap/acorn.c \
|
||||||
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
||||||
util/hostdisk.c util/getroot.c \
|
util/hostdisk.c util/getroot.c \
|
||||||
\
|
\
|
||||||
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
||||||
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.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_script.tab.c grub_emu_init.c
|
||||||
|
|
||||||
grub_emu_LDFLAGS = $(LIBCURSES)
|
grub_emu_LDFLAGS = $(LIBCURSES)
|
||||||
|
|
|
@ -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 \
|
#grub_setup_SOURCES = util/i386/pc/grub-setup.c util/hostdisk.c \
|
||||||
# util/misc.c util/getroot.c kern/device.c kern/disk.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 \
|
# 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 \
|
# 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
|
# 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 \
|
normal/color.c \
|
||||||
script/sh/main.c script/sh/execute.c script/sh/function.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 \
|
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 \
|
partmap/acorn.c partmap/gpt.c \
|
||||||
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
util/console.c util/hostfs.c util/grub-emu.c util/misc.c \
|
||||||
util/hostdisk.c util/getroot.c \
|
util/hostdisk.c util/getroot.c \
|
||||||
\
|
\
|
||||||
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
disk/raid.c disk/raid5_recover.c disk/raid6_recover.c \
|
||||||
disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.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_init.c
|
||||||
|
|
||||||
grub_emu_LDFLAGS = $(LIBCURSES)
|
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
|
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 \
|
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 \
|
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 \
|
efi/efi.h efi/time.h efi/disk.h machine/loader.h i386/pit.h list.h \
|
||||||
handler.h command.h
|
handler.h command.h
|
||||||
kernel_mod_CFLAGS = $(COMMON_CFLAGS)
|
kernel_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
#define GRUB_PC_PARTITION_OPENBSD_TYPE_RAID 19
|
#define GRUB_PC_PARTITION_OPENBSD_TYPE_RAID 19
|
||||||
|
|
||||||
/* The BSD partition entry. */
|
/* The BSD partition entry. */
|
||||||
struct grub_pc_partition_bsd_entry
|
struct grub_msdos_partition_bsd_entry
|
||||||
{
|
{
|
||||||
grub_uint32_t size;
|
grub_uint32_t size;
|
||||||
grub_uint32_t offset;
|
grub_uint32_t offset;
|
||||||
|
@ -110,7 +110,7 @@ struct grub_pc_partition_bsd_entry
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
/* The BSD disk label. Only define members useful for GRUB. */
|
/* 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_uint32_t magic;
|
||||||
grub_uint8_t padding[128];
|
grub_uint8_t padding[128];
|
||||||
|
@ -119,11 +119,11 @@ struct grub_pc_partition_disk_label
|
||||||
grub_uint16_t num_partitions;
|
grub_uint16_t num_partitions;
|
||||||
grub_uint32_t boot_size;
|
grub_uint32_t boot_size;
|
||||||
grub_uint32_t superblock_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));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
/* The partition entry. */
|
/* The partition entry. */
|
||||||
struct grub_pc_partition_entry
|
struct grub_msdos_partition_entry
|
||||||
{
|
{
|
||||||
/* If active, 0x80, otherwise, 0x00. */
|
/* If active, 0x80, otherwise, 0x00. */
|
||||||
grub_uint8_t flag;
|
grub_uint8_t flag;
|
||||||
|
@ -155,20 +155,20 @@ struct grub_pc_partition_entry
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
/* The structure of MBR. */
|
/* The structure of MBR. */
|
||||||
struct grub_pc_partition_mbr
|
struct grub_msdos_partition_mbr
|
||||||
{
|
{
|
||||||
/* The code area (actually, including BPB). */
|
/* The code area (actually, including BPB). */
|
||||||
grub_uint8_t code[446];
|
grub_uint8_t code[446];
|
||||||
|
|
||||||
/* Four partition entries. */
|
/* Four partition entries. */
|
||||||
struct grub_pc_partition_entry entries[4];
|
struct grub_msdos_partition_entry entries[4];
|
||||||
|
|
||||||
/* The signature 0xaa55. */
|
/* The signature 0xaa55. */
|
||||||
grub_uint16_t signature;
|
grub_uint16_t signature;
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
|
||||||
struct grub_pc_partition
|
struct grub_msdos_partition
|
||||||
{
|
{
|
||||||
/* The DOS partition number. */
|
/* The DOS partition number. */
|
||||||
int dos_part;
|
int dos_part;
|
||||||
|
@ -187,13 +187,13 @@ struct grub_pc_partition
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
grub_pc_partition_is_empty (int type)
|
grub_msdos_partition_is_empty (int type)
|
||||||
{
|
{
|
||||||
return (type == GRUB_PC_PARTITION_TYPE_NONE);
|
return (type == GRUB_PC_PARTITION_TYPE_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
grub_pc_partition_is_extended (int type)
|
grub_msdos_partition_is_extended (int type)
|
||||||
{
|
{
|
||||||
return (type == GRUB_PC_PARTITION_TYPE_EXTENDED
|
return (type == GRUB_PC_PARTITION_TYPE_EXTENDED
|
||||||
|| type == GRUB_PC_PARTITION_TYPE_WIN95_EXTENDED
|
|| type == GRUB_PC_PARTITION_TYPE_WIN95_EXTENDED
|
||||||
|
@ -201,7 +201,7 @@ grub_pc_partition_is_extended (int type)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
grub_pc_partition_is_bsd (int type)
|
grub_msdos_partition_is_bsd (int type)
|
||||||
{
|
{
|
||||||
return (type == GRUB_PC_PARTITION_TYPE_FREEBSD
|
return (type == GRUB_PC_PARTITION_TYPE_FREEBSD
|
||||||
|| type == GRUB_PC_PARTITION_TYPE_OPENBSD
|
|| type == GRUB_PC_PARTITION_TYPE_OPENBSD
|
|
@ -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);
|
void EXPORT_FUNC(grub_partition_map_unregister) (grub_partition_map_t partmap);
|
||||||
|
|
||||||
#ifdef GRUB_UTIL
|
#ifdef GRUB_UTIL
|
||||||
void grub_pc_partition_map_init (void);
|
void grub_msdos_partition_map_init (void);
|
||||||
void grub_pc_partition_map_fini (void);
|
void grub_msdos_partition_map_fini (void);
|
||||||
void grub_amiga_partition_map_init (void);
|
void grub_amiga_partition_map_init (void);
|
||||||
void grub_amiga_partition_map_fini (void);
|
void grub_amiga_partition_map_fini (void);
|
||||||
void grub_apple_partition_map_init (void);
|
void grub_apple_partition_map_init (void);
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <grub/mm.h>
|
#include <grub/mm.h>
|
||||||
#include <grub/partition.h>
|
#include <grub/partition.h>
|
||||||
#include <grub/dl.h>
|
#include <grub/dl.h>
|
||||||
#include <grub/pc_partition.h>
|
#include <grub/msdos_partition.h>
|
||||||
#include <grub/gpt_partition.h>
|
#include <grub/gpt_partition.h>
|
||||||
|
|
||||||
static grub_uint8_t grub_gpt_magic[8] =
|
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_header gpt;
|
||||||
struct grub_gpt_partentry entry;
|
struct grub_gpt_partentry entry;
|
||||||
struct grub_disk raw;
|
struct grub_disk raw;
|
||||||
struct grub_pc_partition_mbr mbr;
|
struct grub_msdos_partition_mbr mbr;
|
||||||
grub_uint64_t entries;
|
grub_uint64_t entries;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int last_offset = 0;
|
int last_offset = 0;
|
||||||
|
|
|
@ -18,13 +18,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/partition.h>
|
#include <grub/partition.h>
|
||||||
#include <grub/pc_partition.h>
|
#include <grub/msdos_partition.h>
|
||||||
#include <grub/disk.h>
|
#include <grub/disk.h>
|
||||||
#include <grub/mm.h>
|
#include <grub/mm.h>
|
||||||
#include <grub/misc.h>
|
#include <grub/misc.h>
|
||||||
#include <grub/dl.h>
|
#include <grub/dl.h>
|
||||||
|
|
||||||
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. */
|
/* 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_parse (const char *str)
|
||||||
{
|
{
|
||||||
grub_partition_t p;
|
grub_partition_t p;
|
||||||
struct grub_pc_partition *pcdata;
|
struct grub_msdos_partition *pcdata;
|
||||||
|
|
||||||
char *s = (char *) str;
|
char *s = (char *) str;
|
||||||
|
|
||||||
|
@ -40,12 +40,12 @@ grub_partition_parse (const char *str)
|
||||||
if (! p)
|
if (! p)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
pcdata = (struct grub_pc_partition *) grub_malloc (sizeof (*pcdata));
|
pcdata = (struct grub_msdos_partition *) grub_malloc (sizeof (*pcdata));
|
||||||
if (! pcdata)
|
if (! pcdata)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
p->data = pcdata;
|
p->data = pcdata;
|
||||||
p->partmap = &grub_pc_partition_map;
|
p->partmap = &grub_msdos_partition_map;
|
||||||
|
|
||||||
/* Initialize some of the fields with invalid values. */
|
/* Initialize some of the fields with invalid values. */
|
||||||
pcdata->bsd_part = pcdata->dos_type = pcdata->bsd_type = p->index = -1;
|
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))
|
const grub_partition_t partition))
|
||||||
{
|
{
|
||||||
struct grub_partition p;
|
struct grub_partition p;
|
||||||
struct grub_pc_partition pcdata;
|
struct grub_msdos_partition pcdata;
|
||||||
struct grub_pc_partition_mbr mbr;
|
struct grub_msdos_partition_mbr mbr;
|
||||||
struct grub_pc_partition_disk_label label;
|
struct grub_msdos_partition_disk_label label;
|
||||||
struct grub_disk raw;
|
struct grub_disk raw;
|
||||||
|
|
||||||
/* Enforce raw disk access. */
|
/* Enforce raw disk access. */
|
||||||
|
@ -106,12 +106,12 @@ pc_partition_map_iterate (grub_disk_t disk,
|
||||||
pcdata.ext_offset = 0;
|
pcdata.ext_offset = 0;
|
||||||
pcdata.dos_part = -1;
|
pcdata.dos_part = -1;
|
||||||
p.data = &pcdata;
|
p.data = &pcdata;
|
||||||
p.partmap = &grub_pc_partition_map;
|
p.partmap = &grub_msdos_partition_map;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct grub_pc_partition_entry *e;
|
struct grub_msdos_partition_entry *e;
|
||||||
|
|
||||||
/* Read the MBR. */
|
/* Read the MBR. */
|
||||||
if (grub_disk_read (&raw, p.offset, 0, sizeof (mbr), &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");
|
return grub_error (GRUB_ERR_BAD_PART_TABLE, "dummy mbr");
|
||||||
|
|
||||||
/* If this partition is a normal one, call the hook. */
|
/* If this partition is a normal one, call the hook. */
|
||||||
if (! grub_pc_partition_is_empty (e->type)
|
if (! grub_msdos_partition_is_empty (e->type)
|
||||||
&& ! grub_pc_partition_is_extended (e->type))
|
&& ! grub_msdos_partition_is_extended (e->type))
|
||||||
{
|
{
|
||||||
pcdata.dos_part++;
|
pcdata.dos_part++;
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ pc_partition_map_iterate (grub_disk_t disk,
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* Check if this is a BSD partition. */
|
/* 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. */
|
/* Check if the BSD label is within the DOS partition. */
|
||||||
if (p.len <= GRUB_PC_PARTITION_BSD_LABEL_SECTOR)
|
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 < grub_cpu_to_le16 (label.num_partitions);
|
||||||
pcdata.bsd_part++)
|
pcdata.bsd_part++)
|
||||||
{
|
{
|
||||||
struct grub_pc_partition_bsd_entry *be
|
struct grub_msdos_partition_bsd_entry *be
|
||||||
= label.entries + pcdata.bsd_part;
|
= label.entries + pcdata.bsd_part;
|
||||||
|
|
||||||
p.start = grub_le_to_cpu32 (be->offset);
|
p.start = grub_le_to_cpu32 (be->offset);
|
||||||
|
@ -210,7 +210,7 @@ pc_partition_map_iterate (grub_disk_t disk,
|
||||||
{
|
{
|
||||||
e = mbr.entries + i;
|
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);
|
p.offset = pcdata.ext_offset + grub_le_to_cpu32 (e->start);
|
||||||
if (! pcdata.ext_offset)
|
if (! pcdata.ext_offset)
|
||||||
|
@ -234,14 +234,14 @@ static grub_partition_t
|
||||||
pc_partition_map_probe (grub_disk_t disk, const char *str)
|
pc_partition_map_probe (grub_disk_t disk, const char *str)
|
||||||
{
|
{
|
||||||
grub_partition_t p;
|
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);
|
auto int find_func (grub_disk_t d, const grub_partition_t partition);
|
||||||
|
|
||||||
int find_func (grub_disk_t d __attribute__ ((unused)),
|
int find_func (grub_disk_t d __attribute__ ((unused)),
|
||||||
const grub_partition_t partition)
|
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)
|
if ((pcdata->dos_part == partdata->dos_part || pcdata->dos_part == -1)
|
||||||
&& pcdata->bsd_part == partdata->bsd_part)
|
&& pcdata->bsd_part == partdata->bsd_part)
|
||||||
|
@ -283,7 +283,7 @@ static char *
|
||||||
pc_partition_map_get_name (const grub_partition_t p)
|
pc_partition_map_get_name (const grub_partition_t p)
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
struct grub_pc_partition *pcdata = p->data;
|
struct grub_msdos_partition *pcdata = p->data;
|
||||||
|
|
||||||
name = grub_malloc (13);
|
name = grub_malloc (13);
|
||||||
if (! name)
|
if (! name)
|
||||||
|
@ -301,9 +301,9 @@ pc_partition_map_get_name (const grub_partition_t p)
|
||||||
|
|
||||||
|
|
||||||
/* Partition map type. */
|
/* 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,
|
.iterate = pc_partition_map_iterate,
|
||||||
.probe = pc_partition_map_probe,
|
.probe = pc_partition_map_probe,
|
||||||
.get_name = pc_partition_map_get_name
|
.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_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_MOD_FINI(pc_partition_map)
|
||||||
{
|
{
|
||||||
grub_partition_map_unregister (&grub_pc_partition_map);
|
grub_partition_map_unregister (&grub_msdos_partition_map);
|
||||||
}
|
}
|
|
@ -22,7 +22,7 @@
|
||||||
#include <grub/misc.h>
|
#include <grub/misc.h>
|
||||||
#include <grub/mm.h>
|
#include <grub/mm.h>
|
||||||
#include <grub/err.h>
|
#include <grub/err.h>
|
||||||
#include <grub/pc_partition.h>
|
#include <grub/msdos_partition.h>
|
||||||
#include <grub/device.h>
|
#include <grub/device.h>
|
||||||
#include <grub/disk.h>
|
#include <grub/disk.h>
|
||||||
#include <grub/partition.h>
|
#include <grub/partition.h>
|
||||||
|
@ -42,7 +42,7 @@ static grub_err_t grub_pcpart_boot (const grub_device_t dev,
|
||||||
{
|
{
|
||||||
int i, index;
|
int i, index;
|
||||||
grub_partition_t part;
|
grub_partition_t part;
|
||||||
struct grub_pc_partition_mbr mbr;
|
struct grub_msdos_partition_mbr mbr;
|
||||||
|
|
||||||
if (dev->disk->partition->offset)
|
if (dev->disk->partition->offset)
|
||||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "not a primary partition");
|
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;
|
int index;
|
||||||
grub_uint8_t type;
|
grub_uint8_t type;
|
||||||
grub_partition_t part;
|
grub_partition_t part;
|
||||||
struct grub_pc_partition_mbr mbr;
|
struct grub_msdos_partition_mbr mbr;
|
||||||
|
|
||||||
index = dev->disk->partition->index;
|
index = dev->disk->partition->index;
|
||||||
part = dev->disk->partition;
|
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;
|
type &= ~GRUB_PC_PARTITION_TYPE_HIDDEN_FLAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (grub_pc_partition_is_empty (type)
|
if (grub_msdos_partition_is_empty (type)
|
||||||
|| grub_pc_partition_is_extended (type))
|
|| grub_msdos_partition_is_extended (type))
|
||||||
{
|
{
|
||||||
dev->disk->partition = part;
|
dev->disk->partition = part;
|
||||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid type");
|
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)
|
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_boot,
|
||||||
grub_pcpart_bootargs);
|
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_type,
|
||||||
grub_pcpart_typeargs);
|
grub_pcpart_typeargs);
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <grub/file.h>
|
#include <grub/file.h>
|
||||||
#include <grub/fs.h>
|
#include <grub/fs.h>
|
||||||
#include <grub/partition.h>
|
#include <grub/partition.h>
|
||||||
#include <grub/pc_partition.h>
|
#include <grub/msdos_partition.h>
|
||||||
#include <grub/util/hostdisk.h>
|
#include <grub/util/hostdisk.h>
|
||||||
#include <grub/util/getroot.h>
|
#include <grub/util/getroot.h>
|
||||||
#include <grub/term.h>
|
#include <grub/term.h>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include <grub/disk.h>
|
#include <grub/disk.h>
|
||||||
#include <grub/partition.h>
|
#include <grub/partition.h>
|
||||||
#include <grub/pc_partition.h>
|
#include <grub/msdos_partition.h>
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
#include <grub/err.h>
|
#include <grub/err.h>
|
||||||
#include <grub/util/misc.h>
|
#include <grub/util/misc.h>
|
||||||
|
@ -947,9 +947,9 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev)
|
||||||
int find_partition (grub_disk_t disk __attribute__ ((unused)),
|
int find_partition (grub_disk_t disk __attribute__ ((unused)),
|
||||||
const grub_partition_t partition)
|
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;
|
pcdata = partition->data;
|
||||||
|
|
||||||
if (pcdata)
|
if (pcdata)
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <grub/file.h>
|
#include <grub/file.h>
|
||||||
#include <grub/fs.h>
|
#include <grub/fs.h>
|
||||||
#include <grub/partition.h>
|
#include <grub/partition.h>
|
||||||
#include <grub/pc_partition.h>
|
#include <grub/msdos_partition.h>
|
||||||
#include <grub/gpt_partition.h>
|
#include <grub/gpt_partition.h>
|
||||||
#include <grub/env.h>
|
#include <grub/env.h>
|
||||||
#include <grub/util/hostdisk.h>
|
#include <grub/util/hostdisk.h>
|
||||||
|
@ -121,14 +121,14 @@ setup (const char *dir,
|
||||||
int NESTED_FUNC_ATTR find_usable_region_msdos (grub_disk_t disk __attribute__ ((unused)),
|
int NESTED_FUNC_ATTR find_usable_region_msdos (grub_disk_t disk __attribute__ ((unused)),
|
||||||
const grub_partition_t p)
|
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. */
|
/* There's always an embed region, and it starts right after the MBR. */
|
||||||
embed_region.start = 1;
|
embed_region.start = 1;
|
||||||
|
|
||||||
/* For its end offset, include as many dummy partitions as we can. */
|
/* For its end offset, include as many dummy partitions as we can. */
|
||||||
if (! grub_pc_partition_is_empty (pcdata->dos_type)
|
if (! grub_msdos_partition_is_empty (pcdata->dos_type)
|
||||||
&& ! grub_pc_partition_is_bsd (pcdata->dos_type)
|
&& ! grub_msdos_partition_is_bsd (pcdata->dos_type)
|
||||||
&& embed_region.end > p->start)
|
&& embed_region.end > p->start)
|
||||||
embed_region.end = p->start;
|
embed_region.end = p->start;
|
||||||
|
|
||||||
|
@ -279,9 +279,9 @@ setup (const char *dir,
|
||||||
if (root_dev->disk->partition)
|
if (root_dev->disk->partition)
|
||||||
{
|
{
|
||||||
if (strcmp (root_dev->disk->partition->partmap->name,
|
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;
|
root_dev->disk->partition->data;
|
||||||
dos_part = pcdata->dos_part;
|
dos_part = pcdata->dos_part;
|
||||||
bsd_part = pcdata->bsd_part;
|
bsd_part = pcdata->bsd_part;
|
||||||
|
@ -338,12 +338,12 @@ setup (const char *dir,
|
||||||
goto unable_to_embed;
|
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));
|
find_usable_region_gpt : find_usable_region_msdos));
|
||||||
|
|
||||||
if (embed_region.end == embed_region.start)
|
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!");
|
grub_util_warn ("This msdos-style partition label has no post-MBR gap; embedding won't be possible!");
|
||||||
else
|
else
|
||||||
grub_util_warn ("This GPT partition label has no BIOS Boot Partition; embedding won't be possible!");
|
grub_util_warn ("This GPT partition label has no BIOS Boot Partition; embedding won't be possible!");
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <grub/file.h>
|
#include <grub/file.h>
|
||||||
#include <grub/fs.h>
|
#include <grub/fs.h>
|
||||||
#include <grub/partition.h>
|
#include <grub/partition.h>
|
||||||
#include <grub/pc_partition.h>
|
#include <grub/msdos_partition.h>
|
||||||
#include <grub/gpt_partition.h>
|
#include <grub/gpt_partition.h>
|
||||||
#include <grub/env.h>
|
#include <grub/env.h>
|
||||||
#include <grub/util/hostdisk.h>
|
#include <grub/util/hostdisk.h>
|
||||||
|
|
Loading…
Reference in a new issue