Commit Graph

259 Commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko 76de44d8ac Merge mainline into install 2010-09-15 14:46:53 +02:00
Vladimir 'phcoder' Serbinenko d2ea455141 * grub-core/partmap/sun.c (sun_partition_map_iterate): Don't needlesly
allocate p.
2010-09-14 21:07:39 +02:00
Vladimir 'phcoder' Serbinenko 94564f81a8 * include/grub/disk.h (grub_disk): Remove has_partitions.
All users updated.
	* disk/loopback.c (grub_loopback): Remove has_partitions.
	All users updated.
	(options): Remove partitions. All users updated.
	* util/grub-fstest.c (fstest): Don't pass "-p" to loopback.
	* util/i386/pc/grub-setup.c (setup): copy partition table only when
	actual partition table is found.
2010-09-13 23:59:22 +02:00
Vladimir 'phcoder' Serbinenko 76e61597b4 Merge mainline into install 2010-09-11 17:28:46 +02:00
Vladimir Serbinenko 25761e13ee * util/grub-install.in (grub_partition): New variable.
Set prefix_drive on EFI and PC to (,$grub_partition) as last resort.
	* util/i386/pc/grub-setup.c (setup): Don't touch prefix.
	Fixes a bug reported by Yves Blusseau.
2010-09-11 17:21:48 +02:00
Vladimir 'phcoder' Serbinenko 6ed71f4831 merge mainline into install 2010-09-08 15:05:42 +02:00
Vladimir 'phcoder' Serbinenko 88b87c9313 * grub-core/kern/emu/main.c (main): Reinit LVM and RAID.
* util/grub-probe.c (main): Likewise.
	* util/i386/pc/grub-setup.c (main): Likewise.
	* util/sparc64/ieee1275/grub-setup.c (main): Likewise.
	Reported and debugged by: alexxy
2010-09-05 23:24:57 +02:00
Vladimir 'phcoder' Serbinenko fc2ef1172c * grub-core/io/gzio.c (grub_gzio_open): Removed "transparent" parameter.
Made static.
	(grub_gzfile_open): Removed. All users updated.
	(GRUB_MOD_INIT): New function.
	(GRUB_MOD_FINI): Likewise.
	* grub-core/kern/file.c (grub_file_filters_all): New variable.
	(grub_file_filters_enabled): Likewise.
	(grub_file_open): Handle filters.
	* grub-core/loader/i386/bsd.c (GRUB_MOD_INIT): Load gzio.
	* grub-core/normal/main.c (GRUB_MOD_INIT): Likewise.
	* include/grub/file.h (grub_file_filter_id_t): New type.
	(grub_file_filter_t): Likewise.
	(grub_file_filters_all): New extern variable.
	(grub_file_filters_enabled): Likewise.
	(grub_file_filter_register): New inline function.
	(grub_file_filter_unregister): Likewise.
	(grub_file_filter_disable): Likewise.
	(grub_file_filter_disable_compression): Likewise.
	* include/grub/gzio.h: Removed.
2010-09-05 13:05:36 +02:00
Vladimir 'phcoder' Serbinenko 6c2111e96c Adapt common grub-install for efi and use it 2010-08-30 20:27:59 +02:00
BVK Chaitanya 16c7cb32c8 merge with mainline 2010-08-19 16:54:00 +05:30
Vladimir 'phcoder' Serbinenko a6a11f3cac * util/i386/efi/grub-install.in: Revert to platform-specific behaviour
with -p "".
	Reported by: Tito Keitel.
2010-07-20 20:36:11 +02:00
Colin Watson 139ab97dc3 * disk/raid.c (insert_array): Use md/%s to name mdadm 1.x devices,
removing the homehost if present.
* kern/emu/getroot.c (get_mdadm_name) [__linux__]: New function.
(grub_util_get_grub_dev): Use md/%s to name mdadm 1.x devices,
removing the homehost if present.
(grub_util_get_grub_dev) [__linux__]: Get the array name from mdadm
if possible.
* util/i386/pc/grub-setup.c (main): Handle md/* devices.
2010-07-18 15:53:14 +01:00
BVK Chaitanya 297f0c2b6e merge with mainline 2010-07-13 00:43:28 +05:30
Colin Watson 38d8f4f3f7 * util/i386/pc/grub-setup.c (setup): Rename prefix to
install_prefix, in line with install_dos_part and install_bsd_part.
Add new prefix variable, which is copied to install_prefix after
comparing core.img in memory with the one read from disk in the
no-embedding case, and use that rather than overwriting
install_prefix immediately when installing to a partition.
Fixes Debian bug #586621; based on patches by Matt Kraai and M. Vefa
Bicakci.
2010-07-05 01:09:00 +01:00
Vladimir 'phcoder' Serbinenko 653d6e94b0 * util/i386/efi/grub-install.in: Don't use empty grub_device.
Reported by: Tito Keitel.
2010-07-04 14:23:55 +02:00
Grégoire Sutre 6b654bb0a5 Do not embed when there are multiple (top-level) partmaps. 2010-07-04 11:13:31 +02:00
Vladimir 'phcoder' Serbinenko e8d0a8f85c Merge mainline into bidi 2010-07-02 19:35:07 +02:00
Colin Watson 7d24e434c5 * util/i386/pc/grub-setup.c (usage): Pass an extra `program_name'
argument to printf.
* util/sparc64/ieee1275/grub-setup.c (usage): Likewise.
2010-06-17 21:54:04 +01:00
Colin Watson c88a83f644 * util/i386/pc/grub-setup.c (usage): Fix syntax error.
* util/sparc64/ieee1275/grub-setup.c (usage): Likewise.
2010-06-17 21:49:50 +01:00
Colin Watson 094dfb699e * util/i386/pc/grub-setup.c (usage): Warn against running grub-setup
directly, and recommend grub-install instead.
* util/sparc64/ieee1275/grub-setup.c (usage): Likewise.
2010-06-17 21:20:43 +01:00
Colin Watson 2164da6b25 Fix i386-pc prefix handling with nested partitions (Debian bug
#585068).  Note that the case where the core image is booted using
multiboot and relocated from its original location still requires
more work.
* kern/i386/pc/init.c (make_install_device): If the prefix starts
with "(,", fill the boot drive in between those two characters, but
expect that a full partition specification including partition map
names will follow.
* util/i386/pc/grub-setup.c (setup): Unless an explicit prefix was
specified, write a prefix without the drive name but including a
full partition specification.
2010-06-17 12:15:37 +01:00
BVK Chaitanya d6d0c209d9 merge with mainline 2010-06-12 16:21:10 +05:30
Vladimir 'phcoder' Serbinenko 3a37e3226b Use FOR_* macros instead of *_iterate whenever possible.
* commands/handler.c: Removed.
	* commands/help.c (grub_cmd_help): Use FOR_COMMANDS.
	* commands/minicmd.c (grub_mini_cmd_lsmod): Use FOR_DL_MODULES.
	* conf/any-emu.rmk (kernel_img_SOURCES): Remove kern/handler.c.
	* conf/common.rmk (script/lexer.c_DEPENDENCIES): Add grub_script.yy.h.
	(grub_probe_SOURCES): Remove kern/parser.c.
	(util/grub-script-check.c_DEPENDENCIES): Removed.
	(grub_script_check_SOURCES): Remove kern/handler.c, kern/parser.c
	and grub_script_check_init.c.
	(grub_script_check_init.lst): Removed.
	(grub_script_check_init.h): Likewise.
	(grub_script_check_init.c): Likewise.
	(pkglib_MODULES): Remove handler.mod and sh.mod.
	(handler_mod_SOURCES): Removed.
	(handler_mod_CFLAGS): Likewise.
	(handler_mod_LDFLAGS): Likewise.
	(normal_mod_SOURCES): Remove normal/handler.c.
	Add script/main.c, script/script.c, script/execute.c,
	script/function.c, script/lexer.c, grub_script.tab.c
	and grub_script.yy.c.
	* conf/i386-coreboot.rmk (kernel_img_SOURCES): Remove kern/handler.c.
	* conf/i386-ieee1275.rmk (kernel_img_SOURCES): Likewise.
	* conf/i386-pc.rmk (kernel_img_SOURCES): Likewise.
	(grub_setup_SOURCES): Remove kern/parser.c.
	* conf/i386-qemu.rmk (kernel_img_SOURCES): Remove kern/handler.c.
	* conf/mips-qemu-mips.rmk (kernel_img_SOURCES): Likewise.
	* conf/mips-yeeloong.rmk (kernel_img_SOURCES): Likewise.
	* conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Likewise.
	* conf/sparc64-ieee1275.rmk (kernel_img_SOURCES): Likewise.
	(grub_setup_SOURCES): Remove kern/parser.c.
	* conf/x86-efi.rmk (kernel_img_SOURCES): Remove kern/handler.c.
	* gettext/gettext.c (grub_gettext_delete_list): Don't use grub_list_pop.
	* include/grub/command.h (grub_command_iterate): Removed.
	(FOR_COMMANDS): New macro.
	* include/grub/dl.h (grub_dl): New member next.
	(grub_dl_iterate): Removed.
	(grub_dl_head): New variable declaration.
	(FOR_DL_MODULES): New macro.
	* include/grub/fs.h: Include list.h.
	(grub_fs): Make next first element.
	(grub_fs_list): New variable declaration.
	(grub_fs_register): Make inline.
	(grub_fs_unregister): Likewise.
	(grub_fs_iterate): Removed.
	(FOR_FILESYSTEMS): New macro.
	* include/grub/handler.h: Removed.
	* include/grub/list.h (grub_list_hook_t): Removed.
	(grub_list_test_t): Likewise.
	(grub_list_pop): Likewise.
	(grub_list_iterate): Likewise.
	(grub_list_insert): Likewise.
	(FOR_LIST_ELEMENTS): New macro.
	* include/grub/parser.h (grub_parser_class): Removed.
	(grub_parser_register): Likewise.
	(grub_parser_unregister): Likewise.
	(grub_parser_get_current): Likewise.
	(grub_parser_set_current): Likewise.
	(grub_register_rescue_parser): Likewise.
	(grub_rescue_parse_line): New function.
	* include/grub/partition.h (FOR_PARTITION_MAPS): Use FOR_LIST_ELEMENTS.
	* include/grub/script_sh.h (grub_script_function_list): New variable
	declaration.
	(FOR_SCRIPT_FUNCTIONS): New macro.
	(grub_script_function_iterate): Removed.
	(grub_normal_parse_line): New prototype.
	* include/grub/term.h (FOR_ACTIVE_TERM_INPUTS): Use FOR_LIST_ELEMENTS.
	(FOR_DISABLED_TERM_INPUTS): Likewise.
	(FOR_ACTIVE_TERM_OUTPUTS): Likewise.
	(FOR_DISABLED_TERM_OUTPUTS): Likewise.
	* include/grub/video.h (grub_video_adapter): Move 'next' to first
	element.
	(grub_video_register): Inline.
	(grub_video_unregister): Likewise.
	(grub_video_adapter_list): New variable declaration.
	(grub_video_iterate): Removed.
	(FOR_VIDEO_ADAPTERS): New macro.
	* kern/dl.c (grub_dl_list): Removed. All users updated.
	(grub_dl_iterate): Removed.
	* kern/fs.c (grub_fs_list): Make global.
	(grub_fs_register): Removed.
	(grub_fs_unregister): Likewise.
	(grub_fs_iterate): Likewise.
	* kern/handler.c: Removed.
	* kern/list.c (grub_list_pop): Removed.
	(grub_list_iterate): Likewise.
	(grub_list_insert): Likewise.
	(grub_named_list_find): Use FOR_LIST_ELEMENTS.
	(grub_prio_list_insert): Don't use grub_list_insert.
	* kern/main.c (grub_register_rescue_parser): Don't call
	grub_register_rescue_parser.
	* kern/parser.c (grub_parser_class): Removed.
	(grub_parser_execute): Use grub_rescue_parse_line.
	* kern/rescue_parser.c (grub_rescue_parse_line): Make global.
	(grub_rescue_parser): Removed.
	(grub_register_rescue_parser): Likewise.
	* kern/rescue_reader.c (grub_rescue_run): Use grub_rescue_parse_line.
	* normal/auth.c (is_authenticated): Use FOR_LIST_ELEMENTS.
	(grub_auth_check_authentication): Likewise.
	* normal/completion.c (iterate_command): Removed.
	(grub_normal_do_completion): Use FOR_COMMANDS.
	* normal/handler.c: Removed.
	* normal/main.c (read_config_file): Remove parser changing.
	(grub_normal_execute): Don't call read_handler_list.
	(grub_normal_read_line_real): Statically allocate prompt.
	(grub_cmdline_run): Use grub_normal_parse_line.
	(GRUB_MOD_FINI): Don't call free_handler_list.
	* normal/menu_entry.c (run): Likewise.
	* script/function.c (grub_script_function_list): Make global.
	(grub_script_function_iterate): Removed.
	* script/main.c (grub_normal_parse_line): Make global.
	(grub_sh_parser): Removed.
	(GRUB_MOD_INIT): Likewise.
	(GRUB_MOD_FINI): Likewise.
	* tests/lib/functional_test.c (grub_functional_test): Use
	FOR_LIST_ELEMENTS.
	* tests/lib/test.c (free_failures): Don't use grub_list_pop.
	(grub_test_run): Use FOR_LIST_ELEMENTS.
	* tests/lib/unit_test.c (main): Likewise.
	* util/deviceiter.c (grub_util_iterate_devices): Don't use
	grub_list_pop.
	* util/grub-fstest.c (grub_term_input_class): Removed.
	(grub_term_output_class): Likewise.
	* util/grub-probe.c: Likewise.
	* util/i386/pc/grub-setup.c: Likewise.
	* util/sparc64/ieee1275/grub-setup.c: Likewise.
	* util/grub-script-check.c (main): Don't call grub_init_all and
	grub_fini_all.
	* video/video.c (grub_video_adapter_list): Make global.
	(grub_video_register): Removed.
	(grub_video_unregister): Likewise.
	(grub_video_iterate): Likewise.
2010-06-11 22:31:16 +02:00
Grégoire Sutre 0ea7c4f93c Make --version uniform and avoid hard-coded program name. 2010-06-08 12:52:42 +02:00
Grégoire Sutre e8a6f3b6a5 Use absolute offsets for start of embedding area. 2010-06-08 12:23:30 +02:00
BVK Chaitanya 692d7c2855 pull-in emu-lite branch 2010-05-26 17:49:05 +05:30
Vladimir 'phcoder' Serbinenko 918405fd8c merge mainline into rescue-efi 2010-05-17 21:26:16 +02:00
BVK Chaitanya 8c41176882 automake commit without merge history 2010-05-06 11:34:04 +05:30
BVK Chaitanya ab4da2cd36 build fixes for real platforms 2010-05-06 09:33:45 +05:30
Vladimir 'phcoder' Serbinenko 88d046d01e Switch to new grub-mkimage syntax 2010-04-26 21:27:41 +02:00
Vladimir 'phcoder' Serbinenko 8ea6ecb36d Some cleanups 2010-04-26 21:11:16 +02:00
Vladimir 'phcoder' Serbinenko 287c2f2426 Remove efi/grub-mkimage.c 2010-04-25 19:39:22 +02:00
BVK Chaitanya b02c7c8fb5 added getopt like error for missing option parameters 2010-04-12 21:33:03 +05:30
BVK Chaitanya 8f33d5549f merged with mainline 2010-04-12 20:47:25 +05:30
Vladimir 'phcoder' Serbinenko 4a55d631d7 Merge mainline into for_macros 2010-04-09 22:35:32 +02:00
Vladimir 'phcoder' Serbinenko 9e71201f48 merge mainline into bidi 2010-04-09 19:31:43 +02:00
Grégoire Sutre 50479febcf * util/grub-install.in: Use mkdir -p to create grub directory.
* util/i386/efi/grub-install.in: Likewise.
	* util/ieee1275/grub-install.in: Likewise.
2010-04-03 20:48:36 +02:00
Grégoire Sutre bd5a6415b0 * util/i386/efi/grub-dumpdevtree: replaced the non-portable `==' by
`=' and added double quotes on operands of this equality test.
2010-04-03 20:23:21 +02:00
Vladimir 'phcoder' Serbinenko f651947b58 Merge mainline into bidi 2010-03-30 11:24:28 +02:00
Vladimir 'phcoder' Serbinenko d56a6ac7f6 Remove handlers 2010-03-27 00:19:42 +01:00
Vladimir 'phcoder' Serbinenko c9ea504d25 merge mainline into nestpart 2010-03-26 15:44:13 +01:00
BVK Chaitanya c45d352721 merged in mainline 2010-03-22 17:16:31 +05:30
Colin Watson bed1d3524e * util/grub-install.in: Copy .mo files from @datadir@/locale, to
match where 'make install' puts them.
* util/i386/efi/grub-install.in: Likewise.
2010-03-21 23:04:02 +00:00
Vladimir 'phcoder' Serbinenko dfed5c6bb4 Removed grub_putchar 2010-03-15 11:49:27 +01:00
Matt Kraai 4e02ed5014 2010-03-08 Matt Kraai <kraai@ftbfs.org>
* util/i386/pc/grub-setup.c (setup): Fix a grammatical error (Debian
	bug #559005).
2010-03-08 22:20:02 +00:00
Vladimir 'phcoder' Serbinenko 08dcd91370 2010-03-04 Vladimir Serbinenko <phcoder@gmail.com>
* util/i386/efi/grub-install.in: Copy gettext files.
2010-03-04 15:12:34 +01:00
BVK Chaitanya 09f38ecd5a fix remaining scripts 2010-02-07 10:31:04 +05:30
Vladimir 'phcoder' Serbinenko 58548abbc3 Remove data member in partition structure 2010-02-07 01:48:38 +01:00
Vladimir 'phcoder' Serbinenko 85f90358b1 Remove part_ prefix 2010-02-06 19:33:53 +01:00
Vladimir 'phcoder' Serbinenko 15cb7d433f Reimport nestpart 2010-02-06 18:43:37 +01:00