Commit graph

1918 commits

Author SHA1 Message Date
Douglas Ray
d404d15450 * util/grub-mkpasswd-pbkdf2.c (grub_get_random): Declare OpenBSD PRNG
as secure.
2013-09-18 13:44:00 +02:00
Vladimir 'phcoder' Serbinenko
f163045985 * util/grub-fstest.c: Fix several printf formats.
* util/grub-mkimage.c: Likewise.
	* util/grub-mkimagexx.c: Likewise.
	* util/grub-script-check.c: Likewise.
2013-08-23 09:01:11 +02:00
Vladimir 'phcoder' Serbinenko
5dd5e64b71 * util/getroot.c (grub_find_device): Use cygwin_conv_path ratherthan
removed in current versions cygwin_conv_*.
2013-08-23 08:51:21 +02:00
Vladimir 'phcoder' Serbinenko
8169047804 * util/grub-mkpasswd-pbkdf2.c (grub_password_get): Remove extraneous
error message.
2013-08-22 20:18:16 +02:00
Vladimir 'phcoder' Serbinenko
6b87c10a0b * grub-core/lib/crypto.c (grub_password_get) [GRUB_UTIL]: Add
windows variant.
	* util/grub-mkpasswd-pbkdf2.c: Add windows flavour for retrieving random
	data.
2013-08-22 20:14:07 +02:00
Vladimir 'phcoder' Serbinenko
506b336b82 * util/grub-mkfont.c [!GRUB_BUILD]: Define my_argp_state.
[!GRUB_BUILD]: Remove has_argument.
2013-08-22 18:15:22 +02:00
Vladimir 'phcoder' Serbinenko
8c8c87b7d4 * util/ieee1275/ofpath.c (grub_util_devname_to_ofpath) [_WIN32]:
Replace with a dummy.
2013-08-22 17:29:23 +02:00
Vladimir 'phcoder' Serbinenko
7b780018f5 Handle grub-pe2elf and grub-mkfont for cases when build != host.
* Makefile.am (build-grub-mkfont): Don't include gnulib.
	(build-grub-gen-asciih): Likewise.
	(build-grub-gen-widthspec): Likewise.
	* Makefile.util.def (grub-pe2elf): Remove.
	* config.h.in [GRUB_BUILD]: Use build rather than host constants.
	* configure.ac: Separate tests for build.
	Move ./build-grub-pe2elf to grub-core.
	Fix typo.
	* grub-core/Makefile.am (build-grub-pe2elf): New target.
	* grub-core/kern/emu/misc.c (xasprintf): Don't compile if GRUB_BUILD is
	defined.
	* include/grub/types.h [GRUB_BUILD]: Use build rather than host
	constants.
	* util/grub-mkfont.c [GRUB_BUILD]: Simplify not to rely on argp.
	* util/grub-pe2elf.c: Simplify not to rely on getopt.
	* util/misc.c (program_name) [GRUB_BUILD]: Define to static string.
2013-08-22 17:00:59 +02:00
Vladimir 'phcoder' Serbinenko
984cfd8a79 * grub-core/kern/emu/hostdisk.c (grub_util_get_fd_size): Adapt for
mingw32 as well based on grub_util_get_disk_size.
	* util/misc.c (grub_util_get_disk_size): Removed. all users switched to
	grub_util_get_fd_size.
	(sync): Removed.
	(fsync): Moved to ...
	* grub-core/kern/emu/misc.c (fsync): ... here.
2013-08-22 16:50:12 +02:00
Vladimir 'phcoder' Serbinenko
43ffba7c65 * util/getroot.c: Include sys/wait.h only when we need waitpid. 2013-08-22 16:28:10 +02:00
Vladimir 'phcoder' Serbinenko
fc46e9fca8 * util/grub-fstest.c: Don't check for symlinks on windows. 2013-08-22 16:13:25 +02:00
Ilya Bakulin
0031b22993 * grub-core/kern/emu/hostdisk.c: Add conditionals for OpenBSD.
* util/getroot.c: Likewise.
2013-08-21 21:05:01 +02:00
Vladimir 'phcoder' Serbinenko
1d679ddaa2 * util/import_gcry.py: Add final newline in visibility.h. 2013-08-21 21:00:15 +02:00
Vladimir 'phcoder' Serbinenko
e733cf52f4 * Makefile.am (widthspec.h): Fix typo.
* util/grub-gen-widthspec.c: Likewise.
2013-08-21 20:26:26 +02:00
Vladimir 'phcoder' Serbinenko
c6b066f2e9 Move ascii.h and widthspec.h generation to a separate build-time-only
tool.
2013-08-21 19:53:59 +02:00
Andrey Borzenkov
5e7d94641b * util/getroot.c (grub_util_is_imsm): Fix descriptor and
memory leak.
2013-08-14 20:47:09 +04:00
Andrey Borzenkov
dea55e2a95 * util/getroot.c (pull_lvm_by_command): add --separator option
to vgs call to disable padding of output to 10 characters.
2013-08-14 20:40:39 +04:00
Vladimir 'phcoder' Serbinenko
7c9d0c39af Fix handling of build-time grub-bin2h and grub-mkfont when doing
full Canadian cross. Tested with build=x86_64, host=arm,
	target=ppc-ieee1275.
2013-08-14 10:56:55 +02:00
Colin Watson
36e87d25e1 * util/getroot.c (grub_util_biosdisk_get_grub_dev): Zero out
grub_errno in the case where we handle GRUB_ERR_UNKNOWN_DEVICE by
falling back to the partition device, otherwise a later call to this
function may fail spuriously.
Reported by Axel Beckert.  Fixes Debian bug #708614.
2013-08-13 17:48:56 +02:00
Colin Watson
c137aea04b * util/grub-mkconfig.in: Fix detection of Emacs autosave files. 2013-08-11 16:03:48 +02:00
Vladimir 'phcoder' Serbinenko
ae27e4d323 Merge mainline into arm 2013-07-16 18:43:43 +02:00
Andrey Borzenkov
f5ae3717e4 * util/grub-mknetdir.in: Remove stray line from help output. 2013-07-13 18:44:27 +04:00
Vladimir 'phcoder' Serbinenko
9c28da2a89 Remove early sm712 init as there is no reason for it (the "watchdog"
effect was due to wrong GPIO map).
2013-07-11 16:24:35 +02:00
Vladimir 'phcoder' Serbinenko
6f80a7b231 * util/grub-mkfont.c (write_font_ascii_bitmap): Fix handling of glyphs
not filling whole 8x16 space.
2013-07-11 13:50:18 +02:00
Paul Wise
eb272d84a4 * util/grub-reboot.in: Document submenu usage.
Also-By: Craig Sanders <savannah@taz.net.au>
2013-07-11 13:18:43 +02:00
Colin Watson
e639c204e0 * util/grub-script-check.c: Fail on scripts containing no
commands, to guard against corrupted grub-mkconfig setups that
produce no useful output.
* tests/grub_script_no_commands.in: New test.
* Makefile.util.def (grub_script_no_commands): Add.
Reported by Hans Putter.  Fixes Debian bug #713886.
2013-06-25 15:08:11 +01:00
Andrey Borzenkov
f25870887b * util/grub.d/30_os-prober.in: Add support for probing EFI
System Partition (as of os-prober 1.58).
2013-05-31 20:29:03 +04:00
Vladimir 'phcoder' Serbinenko
fc4c4fddf6 Detach optional parts of gfxterm and integrate in with coreboot init. 2013-05-31 00:42:33 +02:00
Vladimir 'phcoder' Serbinenko
2a800dc3f3 Remove libfdt 2013-05-17 13:58:47 +02:00
Vladimir 'phcoder' Serbinenko
50268344c0 * util/grub-install.in: Gettextize "Not found" message. 2013-05-11 15:54:22 +02:00
Vladimir 'phcoder' Serbinenko
62b15edfd1 Fix distfiles list.
Reported by: Andrey Borzenkov <arvidjaar@gmail.com>
2013-05-11 15:48:08 +02:00
Leif Lindholm
854f383c28 Move common function to dl_helper.c 2013-05-11 10:42:11 +02:00
Vladimir 'phcoder' Serbinenko
8e71d87482 merge mainline into arm 2013-05-11 10:24:24 +02:00
Vladimir 'phcoder' Serbinenko
30b03dc22e * util/grub-install.in: Handle efibootmgr presence check.
Reported by: Leif Lindholm.
2013-05-10 16:58:25 +02:00
Vladimir 'phcoder' Serbinenko
f8024c3f9a * util/grub-mkrescue.in: Replace STR' with STRING' to avoid adding
yet another string (pun intended) to translate.
2013-05-10 16:23:47 +02:00
Vladimir 'phcoder' Serbinenko
3e912fda81 * conf/Makefile.common: Poison float and double on non-emu. 2013-05-08 11:05:37 +02:00
Vladimir 'phcoder' Serbinenko
d22840ec12 Mark few forgotten strings for translation. 2013-05-07 11:41:47 +02:00
Andrey Borzenkov
5945c2f849 Reimplement grub-reboot to not depend on saved_entry. Use next_entry
variable for one time boot menu entry.
2013-05-06 22:13:34 +04:00
Vladimir 'phcoder' Serbinenko
5036166022 First automated video test (running videotest and comparing results) 2013-05-02 14:39:03 +02:00
Vladimir 'phcoder' Serbinenko
c53b4e67e4 Unify more code in grub-install_header. 2013-04-29 12:26:43 +02:00
Vladimir 'phcoder' Serbinenko
d417ddc4e4 Move --directory/--override-directorry to grub-install_header and unify. 2013-04-28 13:35:51 +02:00
Paulo Flabiano Smorigo
1dd70ebd58 * util/ieee1275/ofpath.c (of_path_of_scsi): Fix path output for sas
disks.
	(check_sas): Get sas_adress info.
2013-04-27 22:03:13 +02:00
Vladimir 'phcoder' Serbinenko
e7b8fd08c5 Core compression test. 2013-04-27 19:44:00 +02:00
Vladimir 'phcoder' Serbinenko
17f9fd29d3 Implement grub_machine_get_bootlocation for ARC. 2013-04-27 19:12:11 +02:00
Vladimir 'phcoder' Serbinenko
63314aa43c * util/getroot.c (exec_pipe): Put proper #if's so that its users don't
compile when not needed.
2013-04-26 23:41:13 +02:00
Vladimir 'phcoder' Serbinenko
c4b456d347 * util/grub-mkrescue.in: Rename i386-ieee1275 core image due to
ofw limited ISO support.
2013-04-26 11:27:24 +02:00
Vladimir 'phcoder' Serbinenko
7f63a64fa0 Enable mipsel-arc. 2013-04-25 22:42:35 +02:00
Vladimir 'phcoder' Serbinenko
eec3bb75e9 * util/grub-mkrescue.in: Fix loongson filename. 2013-04-25 02:14:46 +02:00
Vladimir 'phcoder' Serbinenko
e0810df35e * util/grub-mkrescue.in: Move all files that don't have a location
set in stone under /boot/grub. Use ISO hard links rather than copies
	to save some space.
2013-04-25 01:36:20 +02:00
Vladimir 'phcoder' Serbinenko
5e013e56f0 * util/grub-mkrescue.in: Alias sashARCS as sash. 2013-04-24 18:56:47 +02:00
Vladimir 'phcoder' Serbinenko
1a25e72cf6 * util/grub-install.in: Fix target fo qemu_mips.
Fix extension on EFI.
2013-04-24 15:10:29 +02:00
Vladimir 'phcoder' Serbinenko
ab1440bd4e * util/grub-mkrescue.in: Add mips-arc support. 2013-04-24 14:02:58 +02:00
Vladimir 'phcoder' Serbinenko
8528c879e3 Move mips-arc link address. Previous link address was chosen
in belief that RAM on SGI platforms grows down while in fact it
	grows up from an unusual base.
2013-04-24 13:54:17 +02:00
Andrey Borzenkov
4eafa17565 * util/grub.d/30_os-prober.in: Add onstr to linux entries in one
more place.
2013-04-19 12:08:46 +04:00
Vladimir 'phcoder' Serbinenko
daaa64bd90 Add support for pseries and other bootinfo machines to grub-mkrescue.
Tested by: Paulo Flabiano Smorigo.
2013-04-19 00:36:23 +02:00
Vladimir 'phcoder' Serbinenko
d0d2daa661 * util/grub-mkrescue.in: Add GPT for EFI boot. 2013-04-17 19:08:31 +02:00
Vladimir 'phcoder' Serbinenko
25fc51a879 Fix DMRAID partition handling. 2013-04-15 08:37:13 +02:00
Vladimir 'phcoder' Serbinenko
794515225f Add option to compress files on install/image creation. 2013-04-14 19:24:05 +02:00
Vladimir 'phcoder' Serbinenko
b49fe8792a Move GRUB out of system area when using xorriso 1.2.9 or later. 2013-04-14 18:53:14 +02:00
Vladimir 'phcoder' Serbinenko
8ca86b3a03 Support mkrescue on sparc64. 2013-04-14 17:10:55 +02:00
Vladimir 'phcoder' Serbinenko
07aec23c00 * util/grub-mkrescue.in: Fix wrong architecture for ppc dir. 2013-04-13 02:02:19 +02:00
Vladimir 'phcoder' Serbinenko
67ab83538f Better support Apple Intel Macs on CD. 2013-04-13 00:38:04 +02:00
Vladimir 'phcoder' Serbinenko
ba44ca6d1a Replace stpcpy with grub_stpcpy in tools. 2013-04-12 22:37:59 +02:00
Vladimir 'phcoder' Serbinenko
bbdd6305db Handle Japanese special keys.
Reported by: Hiroyuki YAMAMORI.
	Codes supplied by: Hiroyuki YAMAMORI.
2013-04-12 22:26:38 +02:00
Vladimir 'phcoder' Serbinenko
8573d302fc * util/grub-mkimage.c: Document memdisk implying --prefix. 2013-04-12 21:08:53 +02:00
Vladimir 'phcoder' Serbinenko
28af3d867c Relocations cleanup 2013-04-12 16:53:58 +02:00
Vladimir 'phcoder' Serbinenko
bc1cf01cf2 Add uboot header ourselves 2013-04-12 16:46:51 +02:00
Vladimir 'phcoder' Serbinenko
dbc56d8f0b Support i386-ieee1275 grub-mkrescue and make check on it. 2013-04-12 01:29:45 +02:00
Vladimir 'phcoder' Serbinenko
a79b8a1584 Merge powerpc grub-mkrescue flavour with common. Use xorriso HFS+
feature for it.
2013-04-11 23:15:26 +02:00
Andrey Borzenkov
f4b1fa4f3c * util/grub.d/30_os-prober.in: Add onstr to entries for visual
distinction.
2013-04-11 15:11:14 +02:00
Vladimir 'phcoder' Serbinenko
49818a594a Fix missing PVs if they don't contain "interesting" LV. Closes #38677.
Fix few warining messages and leaks while on it.
2013-04-11 00:08:27 +02:00
Vladimir 'phcoder' Serbinenko
d5e2a158e1 Fix ia64-efi image generation on big-endian machines. Deduplicate
some code while on it.
	Reported by: Leif Lindholm.
2013-04-09 19:19:19 +02:00
Leif Lindholm
389b31cd71 Initial import of Leif's work 2013-04-07 02:41:07 +02:00
Andrey Borzenkov
59624ca858 * util/grub-install_header: Use @PACKAGE@.mo in message catalog name
instead of hardcoding grub.mo.
2013-04-06 20:14:29 +02:00
Fedora Ninjas
1f44478c26 * util/grub.d/30_os-prober.in: Support btrrfs linux-prober extensions. 2013-04-05 14:55:37 +02:00
Vladimir 'phcoder' Serbinenko
132867de71 * util/grub-mkfont.c: Prefer enum to #define. 2013-04-05 11:13:37 +02:00
Francesco Lavra
c506fc3056 * util/grub-mkimage.c: Introduce new define EFI32_HEADER_SIZE. 2013-04-04 20:07:44 +02:00
Vladimir 'phcoder' Serbinenko
aa42823871 Unify file copying setup across different install scripts. Add
options for performing partial install.
2013-04-04 19:59:59 +02:00
Vladimir 'phcoder' Serbinenko
c962563095 * util/grub-setup.c (setup): Handle some corner cases. 2013-04-04 08:55:06 +02:00
Andrey Borzenkov
a7b1d6933b * util/grub-mount.c (fuse_init): Return error if fuse_main
failed.
2013-04-03 11:28:16 +02:00
Vladimir 'phcoder' Serbinenko
ff99babdfe * util/grub.d/20_linux_xen.in: Automatically add no-real-mode edd=off on
non-BIOS platforms.
2013-03-24 14:03:33 +01:00
Vladimir 'phcoder' Serbinenko
6ccd0b31c1 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
handling of multi-device filesystems.
2013-03-24 13:11:19 +01:00
Vladimir 'phcoder' Serbinenko
774683685f Lift up core size limits on some platforms. Fix potential memory
corruption with big core on small memory systems. Document remaining
	limits.
2013-03-07 08:17:24 +01:00
Vladimir 'phcoder' Serbinenko
f9b7d78007 * util/grub-editenv.c (list_variables): Move print_var out of its
parent.
2013-03-01 13:52:05 +01:00
Vladimir 'phcoder' Serbinenko
6c69e691ca * util/grub-fstest.c: Remove nested functions. 2013-02-28 09:36:55 +01:00
Colin Watson
4eb8b75659 Remove nested functions from disk and file read hooks.
* include/grub/disk.h (grub_disk_read_hook_t): New type.
	(struct grub_disk): Add read_hook_data member.
	* include/grub/file.h (struct grub_file): Likewise.
	* include/grub/fshelp.h (grub_fshelp_read_file): Add read_hook_data
	argument.

	Update all callers.
2013-02-27 17:19:15 +01:00
Andrey Borzenkov
f81ef4b580 * util/grub-install.in: change misleading comment about
device.map creation
2013-01-27 16:17:21 +01:00
Colin Watson
7782b8a62f * util/grub-reboot.in (usage): Document the need for
GRUB_DEFAULT=saved.
* util/grub-set-default.in (usage): Likewise.
Reported by: Brian Candler.  Fixes Ubuntu bug #1102925.
2013-01-22 14:28:32 +00:00
Vladimir 'phcoder' Serbinenko
822b726b33 Improve spkmomdem reliability by adding a separator between bytes. 2013-01-21 14:55:30 +01:00
Colin Watson
fc524edf65 Remove nested functions from filesystem directory iterators.
* include/grub/fs.h (grub_fs_dir_hook_t): New type.
(struct grub_fs.dir): Add hook_data argument.

Update all implementations and callers.
2013-01-21 01:33:46 +00:00
Leif Lindholm
c821711f69 * util/grub-mkimage.c (main): Postpone freeing arguments.output
until after its use in generate_image.
2013-01-20 23:16:34 +00:00
Vladimir 'phcoder' Serbinenko
08dad2dcf9 * util/grub-script-check.c (main): Uniform the error message. 2013-01-20 22:05:55 +01:00
Colin Watson
25239370fd Remove nested functions from device iterators.
* include/grub/arc/arc.h (grub_arc_iterate_devs_hook_t): New type.
(grub_arc_iterate_devs): Add hook_data argument.
* include/grub/ata.h (grub_ata_dev_iterate_hook_t): New type.
(struct grub_ata_dev.iterate): Add hook_data argument.
* include/grub/device.h (grub_device_iterate_hook_t): New type.
(grub_device_iterate): Add hook_data argument.
* include/grub/disk.h (grub_disk_dev_iterate_hook_t): New type.
(struct grub_disk_dev.iterate): Add hook_data argument.
(grub_disk_dev_iterate): Likewise.
* include/grub/gpt_partition.h (grub_gpt_partition_map_iterate):
Likewise.
* include/grub/msdos_partition.h (grub_partition_msdos_iterate):
Likewise.
* include/grub/partition.h (grub_partition_iterate_hook_t): New
type.
(struct grub_partition_map.iterate): Add hook_data argument.
(grub_partition_iterate): Likewise.
* include/grub/scsi.h (grub_scsi_dev_iterate_hook_t): New type.
(struct grub_scsi_dev.iterate): Add hook_data argument.

Update all callers.
2013-01-20 15:52:15 +00:00
Vladimir 'phcoder' Serbinenko
600dc5f153 Add license header to spkmodem-recv.c. 2013-01-18 11:54:28 +01:00
Vladimir 'phcoder' Serbinenko
17334a6b6a Rewrite spkmodem to use PIT for timing. Double the speed. 2013-01-17 20:06:52 +01:00
Vladimir 'phcoder' Serbinenko
b78d6c32e3 New terminal outputs using serial: morse and spkmodem. 2013-01-16 20:39:54 +01:00
Colin Watson
09fd6d8293 Remove nested functions from script reading and parsing.
* grub-core/kern/parser.c (grub_parser_split_cmdline): Add
getline_data argument, passed to getline.
* grub-core/kern/rescue_parser.c (grub_rescue_parse_line): Add
getline_data argument, passed to grub_parser_split_cmdline.
* grub-core/script/lexer.c (grub_script_lexer_yywrap): Pass
lexerstate->getline_data to lexerstate->getline.
(grub_script_lexer_init): Add getline_data argument, saved in
lexerstate->getline_data.
* grub-core/script/main.c (grub_normal_parse_line): Add getline_data
argument, passed to grub_script_parse.
* grub-core/script/script.c (grub_script_parse): Add getline_data
argument, passed to grub_script_lexer_init.
* include/grub/parser.h (grub_parser_split_cmdline): Update
prototype.  Update all callers to pass appropriate getline data.
(struct grub_parser.parse_line): Likewise.
(grub_rescue_parse_line): Likewise.
* include/grub/reader.h (grub_reader_getline_t): Add void *
argument.
* include/grub/script_sh.h (struct grub_lexer_param): Add
getline_data member.
(grub_script_parse): Update prototype.  Update all callers to pass
appropriate getline data.
(grub_script_lexer_init): Likewise.
(grub_normal_parse_line): Likewise.

* grub-core/commands/legacycfg.c (legacy_file_getline): Add unused
data argument.
* grub-core/kern/parser.c (grub_parser_execute: getline): Make
static instead of nested.  Rename to ...
(grub_parser_execute_getline): ... this.
* grub-core/kern/rescue_reader.c (grub_rescue_read_line): Add unused
data argument.
* grub-core/normal/main.c (read_config_file: getline): Make static
instead of nested.  Rename to ...
(read_config_file_getline): ... this.
(grub_normal_read_line): Add unused data argument.
* grub-core/script/execute.c (grub_script_execute_sourcecode:
getline): Make static instead of nested.  Rename to ...
(grub_script_execute_sourcecode_getline): ... this.
* util/grub-script-check.c (main: get_config_line): Make static
instead of nested.
2013-01-15 12:03:25 +00:00
Vladimir 'phcoder' Serbinenko
22099030ad * grub-core/kern/emu/hostdisk.c (read_device_map): Explicitly
delimit path in strings using quotes.
	* util/getroot.c (grub_guess_root_devices): Likewise.
	(grub_make_system_path_relative_to_its_root): Likewise.
	* util/grub-probe.c (probe): Likewise.
	* util/ieee1275/ofpath.c (find_obppath): Likewise.
	(xrealpath): Likewise.
2013-01-13 22:45:16 +01:00
Vladimir 'phcoder' Serbinenko
4a9950ecb0 Fix compilation with older compilers.
* grub-core/Makefile.core.def (mpi): Add mpi-inline.c.
	* grub-core/lib/libgcrypt_wrap/cipher_wrap.h: Remove redundant
	declarations.
	* grub-core/lib/posix_wrap/string.h: Include sys/types.h.
	* grub-core/lib/posix_wrap/sys/types.h: Add common types.
	* grub-core/lib/xzembed/xz_dec_lzma2.c (dict_put): Replace byte
	identifier with b.
	* grub-core/lib/xzembed/xz_dec_stream.c (dec_vli): Likewise.
	* include/grub/crypto.h: Add type defines.
	* util/import_gcrypth.sed: Remove duplicate type defines.
2013-01-13 21:06:25 +01:00
Colin Watson
a45289370a * util/grub-mkimage.c (generate_image): Fix "size of public key"
info message.
2013-01-13 01:47:46 +00:00
Vladimir 'phcoder' Serbinenko
4d7219f90b * autogen.sh: Do not try to delete nonexistant files.
* util/import_gcrypth.sed: Add some missing header removals.
2013-01-12 16:14:09 +01:00
Colin Watson
01323d49bf Clean up dangling references to grub-setup.
Fixes Ubuntu bug #1082045.

* docs/grub.texi (Images): Refer generally to grub-install rather
than directly to grub-setup.
(Installing GRUB using grub-install): Remove direct reference to
grub-setup.
(Device map) Likewise.
(Invoking grub-install): Likewise.
* docs/man/grub-install.h2m (SEE ALSO): Likewise.
* docs/man/grub-mkimage.h2m (SEE ALSO): Likewise.
* util/grub-install.in (usage): Likewise.

* util/bash-completion.d/grub-completion.bash.in (_grub_setup):
Apply to grub-bios-setup and grub-sparc64-setup rather than to
grub-setup.
* configure.ac: Remove grub_setup output variable.

* docs/man/grub-bios-setup.h2m (NAME): Change name from grub-setup
to grub-bios-setup.
* docs/man/grub-sparc64-setup.h2m (NAME): Change name from
grub-setup to grub-sparc64-setup.
2013-01-12 13:30:37 +00:00
Vladimir 'phcoder' Serbinenko
5e3b8dcbb5 Import gcrypt public-key cryptography and implement signature checking. 2013-01-11 21:32:42 +01:00
Vladimir 'phcoder' Serbinenko
a4c3ed4c8f * util/grub.d/10_kfreebsd.in: Correct the patch to zpool.cache as it's
always in /boot/zfs.
	Reported by: Yuta Satoh.
2013-01-03 23:19:19 +01:00
Yuta Satoh
0b716507a1 * util/grub.d/10_kfreebsd.in: Fix improper references to grub-probe by
${grub_probe}
2013-01-03 23:06:07 +01:00
Colin Watson
608b647ad9 * util/grub-mkconfig.in: Accept GRUB_TERMINAL_OUTPUT=vga_text.
Fixes Savannah bug #37821.
2012-12-28 07:21:17 +00:00
Colin Watson
fd49ceb35c Apply program name transformations at build-time rather than at
run-time.  Fixes Debian bug #696465.

* acinclude.m4 (grub_TRANSFORM): New macro.
* configure.ac: Create output variables with transformed names for
most programs.
* util/bash-completion.d/grub-completion.bash.in: Use
pre-transformed variables for program names.
* util/grub-install.in: Likewise.
* util/grub-kbdcomp.in: Likewise.
* util/grub-mkconfig.in: Likewise.
* util/grub-mkconfig_lib.in: Likewise.
* util/grub-mknetdir.in: Likewise.
* util/grub-mkrescue.in: Likewise.
* util/grub-mkstandalone.in: Likewise.
* util/grub-reboot.in: Likewise.
* util/grub-set-default.in: Likewise.
* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
* tests/util/grub-shell-tester.in: Remove unused assignment.
* tests/util/grub-shell.in: Likewise.
* util/grub.d/00_header.in: Likewise.
2012-12-28 06:57:17 +00:00
Vladimir 'phcoder' Serbinenko
e3501b1306 * util/grub.d/20_linux_xen.in: Addmissing assignment to machine.
Reported by: Eriks Latosheks <foresterlv>.
2012-12-11 17:40:35 +01:00
Paulo Flabiano Smorigo
0f596201dc * util/grub-install.in: Follow the symbolic link parameter added
to the file command.
2012-12-10 17:07:01 +01:00
Andrey Borzenkov
600d5bdbf5 * util/grub-install.in: Remove stale TODO. 2012-12-10 17:00:56 +01:00
Vladimir Testov
b9f5ebd65c * util/grub-mkfont.c (argp_parser): Fix a typo which prevented --asce
from working.
2012-12-10 11:45:00 +01:00
Vladimir 'phcoder' Serbinenko
258f43b7d7 * util/getroot.c (convert_system_partition_to_system_disk): Support
nbd disks.
2012-12-10 11:12:38 +01:00
Grégoire Sutre
03711240c8 Fix ordering and tab indentation of NetBSD boot menu entries. 2012-10-28 11:55:22 +01:00
Colin Watson
0d35da3f2b * util/grub-mkconfig_lib.in (is_path_readable_by_grub): Redirect
errors from grub-probe to /dev/null, not stdout.
2012-09-26 13:12:20 +01:00
Colin Watson
473959f052 * util/grub-install.in: Make the error message if $source_dir
doesn't exist more useful.
2012-09-24 18:50:35 +01:00
Colin Watson
794c8c3375 Fix grub-emu build on FreeBSD.
* Makefile.util.def (grub-mount): Add LIBGEOM to ldadd.
* grub-core/net/drivers/emu/emunet.c: Only include Linux-specific
headers on Linux.
(GRUB_MOD_INIT): Return immediately on non-Linux platforms; this
implementation is currently Linux-specific.
* util/getroot.c (exec_pipe): Define only on Linux or when either
libzfs or libnvpair is unavailable.
(find_root_devices_from_poolname): Remove unused path variable.
2012-09-22 21:19:58 +01:00
Colin Watson
735abf545c * util/grub-setup.c (write_rootdev): Remove unused core_img
parameter.  Update all callers.
(setup): Define core_sectors only if GRUB_SETUP_BIOS, to appease
'gcc -Wunused-but-set-variable'.  Remove unnecessary nested #ifdef
GRUB_SETUP_BIOS.
2012-09-19 02:41:51 +01:00
Vladimir 'phcoder' Serbinenko
140acd3c83 * util/grub-mkconfig_lib.in (grub_tab): New variable.
(grub_add_tab): New function.
	* util/grub.d/10_hurd.in: Replace \t with $grub_tab orgrub_add_tab.
	* util/grub.d/10_illumos.in: Likewise.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/10_xnu.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
2012-09-18 13:04:06 +02:00
Colin Watson
a2fc392426 * util/grub-mkconfig_lib.in (grub_quote): Remove outdated sentence
from comment.
2012-09-17 16:58:50 +01:00
Vladimir 'phcoder' Serbinenko
592fd0e4d6 * grub-core/disk/diskfilter.c (free_array) [GRUB_UTIL]: Fix memory leak.
* util/getroot.c (grub_find_device): Likewise.
	(get_mdadm_uuid): Likewise.
	(grub_util_is_imsm): Likewise.
	(grub_util_pull_device): Likewise.
	* util/grub-probe.c (probe): Likewise.
2012-09-11 07:53:26 +02:00
Colin Watson
ecadc4c2c4 * util/import_gcry.py: Sort cipher_files, to make build system
generation more deterministic.
2012-09-05 09:00:39 +01:00
Vladimir 'phcoder' Serbinenko
a885261b5d * util/grub-mkconfig_lib.in (grub_quote): Remove extra layer of escape.
* util/grub.d/10_hurd.in: Add missing quoting.
	* util/grub.d/10_illumos.in: Likewise.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
2012-07-22 20:02:17 +02:00
Yves Blusseau
5e6a440ad7 * util/grub-mkconfig_lib.in: Fix print messages replacing builtin
echo shell command by printf command.
2012-06-27 11:22:43 +02:00
Vladimir 'phcoder' Serbinenko
4dc02ddfc5 * util/grub-mkimage.c (generate_image): Add Yeeloong verified hash. 2012-06-26 03:38:10 +02:00
Vladimir 'phcoder' Serbinenko
e9e6f11155 * util/grub-install.in: Fix dvhtool invocation. Add arc to the list of
platforms with firmware disk drivers in the core.
2012-06-25 19:32:22 +02:00
Vladimir 'phcoder' Serbinenko
0b5ea6b8c3 * util/grub-mkimage.c (generate_image): Add Fuloong2F verified hash. 2012-06-25 12:36:50 +02:00
Vladimir 'phcoder' Serbinenko
d1718e7d2b * util/getroot.c (grub_find_root_devices_from_mountinfo): Handle btrfs
subvolumes.
2012-06-22 22:11:23 +02:00
Vladimir 'phcoder' Serbinenko
ef76bec332 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Generate
UUID search command even if hints probing failed.
2012-06-18 21:07:26 +02:00
Vladimir 'phcoder' Serbinenko
3f2bdd8f55 * Makefile.util.def (grub-mkrescue): Enable on loongson.
* util/grub-mkrescue.in: Handle loongson.
2012-06-15 18:35:11 +02:00
Vladimir 'phcoder' Serbinenko
29a049c98a * util/getroot.c (convert_system_partition_to_system_disk) [__APPLE__]:
Set is_part appropriately.
	(grub_util_biosdisk_get_grub_dev): Use is_part rather than comparing
	names. Canonicalize partition without full disk.
2012-06-14 19:16:30 +02:00
Vladimir 'phcoder' Serbinenko
505b3c9b74 * util/grub-install.in: Fix cross-disk check on non-PreP machines. 2012-06-13 01:09:36 +02:00
Vladimir 'phcoder' Serbinenko
8d03d28424 * util/powerpc/ieee1275/grub-mkrescue.in: Handle (and ignore)
--rom-directory.
	Add -graft-points.
2012-06-08 20:23:39 +02:00
Vladimir 'phcoder' Serbinenko
558d3a6023 * util/getroot.c (grub_util_get_dm_node_linear_info): Moved from here...
* grub-core/kern/emu/hostdisk.c (grub_util_get_dm_node_linear_info):
	to here. New return value start. All users updated.
	Recursively scan linear mappings.
	* include/grub/emu/hostdisk.h (grub_util_get_dm_node_linear_info): New
	proto.
	* grub-core/kern/emu/hostdisk.c (grub_hostdisk_find_partition_start):
	Use grub_util_get_dm_node_linear_info.
	* util/getroot.c (convert_system_partition_to_system_disk): Use
	grub_util_info rather than grub_dprintf.
	(grub_util_biosdisk_get_grub_dev): Add a new grub_util_info.
2012-06-07 14:24:48 +02:00
Vladimir 'phcoder' Serbinenko
24bd8838f1 * include/grub/types.h (grub_set_unaligned64): New function.
* util/grub-setup.c (write_rootdev): Use unaligned access functions.
	(setup): Likewise.
2012-06-07 14:07:02 +02:00
Vladimir 'phcoder' Serbinenko
8dcbe03b82 * util/grub-fstest.c (cmd_crc): Use grub_get_unaligned32 for safety. 2012-06-06 12:42:11 +02:00
Vladimir 'phcoder' Serbinenko
070038f843 * Makefile.util.def (grub-mkrescue) Anable on mips_qemu_mips and
ia64.
	* util/grub-mkrescue.in: Handle qemu-mips and ia64. Add missing
	quotes while on it.
2012-06-06 12:31:24 +02:00
Vladimir 'phcoder' Serbinenko
81f6ef0e2d * util/grub-mkimage.c: Disable -Wcast-align. 2012-06-05 17:22:29 +02:00
Vladimir 'phcoder' Serbinenko
944f752dbb * util/grub-probe.c (escape_of_path): Fix double free. 2012-06-05 17:16:14 +02:00
Vladimir 'phcoder' Serbinenko
1e1eb50e5e * util/grub.d/20_linux_xen.in: Skip xen-syms. 2012-06-05 11:55:48 +02:00
Vladimir 'phcoder' Serbinenko
1c715b5afd * util/grub-probe.c (escape_of_path): Don't add ieee1275/.
(probe): Add ieee1275 to OFW devices.
2012-06-05 11:31:10 +02:00
Vladimir 'phcoder' Serbinenko
007ae52dac * util/ieee1275/ofpath.c (of_path_of_scsi): Fix wrong format specifier. 2012-06-04 23:15:54 +02:00
Vladimir 'phcoder' Serbinenko
4557a36d2c Handle IBM OFW path.
* util/ieee1275/ofpath.c (find_obppath): Use devspec if obppath isn't
	available.
	(of_path_of_scsi): Handle vdevice.
2012-06-04 22:37:39 +02:00
Isao Shimizu
0d3d137e79 * util/ieee1275/ofpath.c (check_sas): Fix sas path. 2012-06-02 14:53:23 +02:00
Vladimir 'phcoder' Serbinenko
de89d33847 * util/getroot.c (grub_guess_root_devices): Don't canonicalise
/dev/root and /dev/dm-*.
2012-06-02 14:36:27 +02:00
Vladimir 'phcoder' Serbinenko
8a7ecad3ab * util/grub-install.in: Check for ieee1275 and not ieee1276. 2012-06-01 22:43:10 +02:00
Paulo Flabiano Smorigo
e12bcb1c61 * util/grub-install.in: Write core.elf in PReP even if the --no-nvram
parameter is used.
2012-05-31 13:38:21 +02:00
Vladimir 'phcoder' Serbinenko
b105df76f4 * configure.ac: Add condition for COND_HOST_XNU.
* Makefile.util.def (10_xnu): New script.
	* util/grub.d/10_xnu.in: New file, extracted from 30_os_prober.in.
2012-05-29 13:56:21 +02:00
Vladimir 'phcoder' Serbinenko
037f6d9060 * util/getroot.c (grub_util_biosdisk_get_grub_dev) [__APPLE__]:
Implement Apple flavour.
	(convert_system_partition_to_system_disk) [__APPLE__]: Likewise.
2012-05-28 17:43:12 +02:00
Vladimir 'phcoder' Serbinenko
40e80b9403 * grub-core/normal/main.c (read_config_file): Provide config_file and
config_directory.
	* util/grub.d/41_custom.in: Use config_directoy when available.
2012-05-27 15:34:41 +02:00
Vladimir 'phcoder' Serbinenko
d336f65225 * util/grub-mkconfig_lib.in (print_option_help): Properly redirect
stderr on test calls.
2012-05-27 13:14:42 +02:00
Vladimir 'phcoder' Serbinenko
d6b1fd3654 * util/grub-fstest.c (cmd_cmp): Fix stat'ing of wrong file. 2012-05-25 17:57:25 +02:00
Vladimir 'phcoder' Serbinenko
79dbc21c54 * util/grub.d/20_linux_xen.in: Add missing line. 2012-05-14 11:47:22 +02:00
Vladimir 'phcoder' Serbinenko
fe8c2f1117 Use grub-probe and not cmp to check that disk is empty.
* util/grub-install.in: Use grub-probe for zero-check.
	* util/grub-probe.c (PRINT_ZERO_CHECK): New enum value.
	(probe): Handle PRINT_ZERO_CHECK.
	(argp_parser): Handle -t zero_check.
2012-05-11 21:07:39 +02:00
Vladimir 'phcoder' Serbinenko
8aeb18379b * util/grub-menulst2cfg.c (main): Check return value of fwrite.
* util/grub-mklayout.c (write_file): Likewise. New argument fname.
	All users updated.
2012-05-10 09:39:11 +02:00
Vladimir 'phcoder' Serbinenko
9133fd053f * util/grub.d/20_linux_xen.in: Update initrd list based on 10_linux.in
counterpart.
2012-05-10 02:36:23 +02:00
Vladimir 'phcoder' Serbinenko
df760f778a * util/grub-install.in: Ignore empty devicetree directory. 2012-05-08 23:11:47 +02:00
Vladimir 'phcoder' Serbinenko
4f8e368fc0 * util/grub-install.in: Fix handling of prefix containing spaces. 2012-05-04 17:18:35 +02:00
Samuel Thibault
1796965f6c * util/getroot.c (find_hurd_root_device): Try to make error message
and comments to translators clearer.
2012-05-04 02:26:39 +02:00
Vladimir 'phcoder' Serbinenko
48d57ed779 Revert last commit based on lack of consensus and possible unsmooth migration path 2012-05-04 01:06:21 +02:00
Vladimir 'phcoder' Serbinenko
e0ca063a66 * util/grub.d/00_header.in: Make timeout apply to else
clause of hidden timout.
	Reported by: Mads Kiilerich.
2012-05-04 00:41:57 +02:00
Samuel Thibault
e5e4ca486c Handle hurd userspace partitions.
* util/getroot.c (find_hurd_root_device): New function.
	(grub_guess_root_devices): Use find_hurd_root_device on Hurd.
2012-05-03 23:41:46 +02:00
Vladimir 'phcoder' Serbinenko
56bb5dd518 * util/getroot.c (convert_system_partition_to_system_disk); Add etherd
names.
	Reported by: Bastian Blank.
2012-05-03 22:59:16 +02:00
Vladimir 'phcoder' Serbinenko
5700603549 * util/grub-fstest.c (cmd_cmp): Avoid comparing devices, pipes
and so on.
2012-05-03 20:20:28 +02:00
Vladimir 'phcoder' Serbinenko
dab797f476 * util/grub-fstest.c (cmd_cmp): Compare directories recursively. 2012-05-03 16:45:40 +02:00
Vladimir 'phcoder' Serbinenko
8db10f47fe * util/grub-setup.c (setup): Remove duplicate call to embed. Fixes
crash when embedding onto filesystem.
2012-05-02 10:09:01 +02:00
Vladimir 'phcoder' Serbinenko
bcb288ed17 * util/getroot.c (find_root_devices_from_poolname): Handle spaces in the
name.
2012-05-02 09:56:56 +02:00
Vladimir 'phcoder' Serbinenko
a20f6ad048 * util/grub-mkrescue.in: Fix locale directory. 2012-04-23 17:17:50 +02:00
Bean
1c557d30ef * util/grub-fstest.c (fstest): Add missing break. 2012-04-23 17:11:49 +02:00
root
fe4824e998 Fix hurd build.
* util/getroot.c [__GNU__] (strip_extra_slashes, xgetcwd, exec_pipe,
find_root_devices_from_poolname, find_root_devices_from_libzfs,
grub_find_device): Do not define.
2012-04-22 19:02:55 +00:00
Vladimir 'phcoder' Serbinenko
9a06490c07 Fix kfreebsd compile and behaviour.
* grub-core/kern/emu/hostdisk.c (grub_util_follow_gpart_up): Fix
	format-security.
	* util/getroot.c: Fix wait.h include.
	(grub_guess_root_devices): Error if grub_find_device fails.
	(grub_util_get_geom_abstraction): Fix shadowing and format-security.
	(grub_util_get_dev_abstraction): Likewise.
	(grub_util_pull_device): Likewise.
	(grub_util_get_grub_dev): Likewise.
	* util/lvm.c (grub_util_lvm_isvolume): Likewise.
2012-04-21 16:49:56 +02:00
Vladimir 'phcoder' Serbinenko
48143d96a6 Fix and unify wholedisk detection.
* util/getroot.c (convert_system_partition_to_system_disk): New argument
	is_part. All users updated.
	(device_is_wholedisk): Removed.
	(grub_util_biosdisk_get_grub_dev): Use is_part.
2012-04-21 16:42:28 +02:00
Mads Kiilerich
81092a75e5 * grub-mkconfig_lib.in: Ignore *.rpmnew and *.rpmsave. 2012-04-18 23:31:26 +02:00
Mike Gilbert
f8315e145d * util/grub.d/10_linux.in: Fix detection of genkernel initramfs. 2012-04-18 23:25:21 +02:00
Vladimir 'phcoder' Serbinenko
33d918b85f * util/grub-install.in: Fix an automatic target detection bug. 2012-04-18 23:01:51 +02:00
Vladimir 'phcoder' Serbinenko
c6ca973d4b * util/grub-install.in: New option --efi-directory. 2012-04-18 22:43:55 +02:00
Vladimir 'phcoder' Serbinenko
b9153381b8 * util/grub-mknetdir.in: Rename --override-directory to --directory and
document it.
	* tests/util/grub-shell.in: Update to --directory.
2012-04-14 15:20:45 +02:00
Vladimir 'phcoder' Serbinenko
5600807745 * util/grub-setup.c (setup): Fix partition handling and blocklist
check.
2012-04-13 16:58:02 +02:00
Vladimir 'phcoder' Serbinenko
9f9d3f69f4 Fix --help formatting.
* util/grub-mkconfig_lib.in (print_option_help): New function.
	(grub_fmt): Likewise.
	* util/grub-install.in: Use print_option_help and grub_fmt.
	* util/grub-kbdcomp.in: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mkstandalone.in: Likewise.
	* util/grub-reboot.in: Likewise.
	* util/grub-set-default.in: Likewise.
	* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
2012-04-07 19:49:25 +02:00
Vladimir 'phcoder' Serbinenko
4e75f21c33 * util/getroot.c (convert_system_partition_to_system_disk): Fix use
after free.
	Reported by: Peter Jones.
2012-03-31 12:27:10 +02:00
Vladimir 'phcoder' Serbinenko
08fbf92ecb * util/grub-install.in: Fix nvram call for PreP. 2012-03-28 17:58:21 +02:00
Vladimir 'phcoder' Serbinenko
b6cf74c901 * util/getroot.c (grub_make_system_path_relative_to_its_root): Fix
missing quotes which caused confusion among translators.
2012-03-19 16:30:16 +01:00
Vladimir 'phcoder' Serbinenko
83c93b9cf5 * util/grub-mkconfig_lib.in: Fix typo. 2012-03-19 16:27:59 +01:00
Vladimir 'phcoder' Serbinenko
9fdb2d7b11 Fix handling of leading spaces in scripts.
* grub-core/normal/cmdline.c (grub_cmdline_get): Don't strip leading
	spaces.
	* grub-core/normal/main.c (grub_file_getline): Remove all preprocessing
	other than skipping \r. All users updated.
	* tests/grub_script_echo1.in: Add space-related tests.
	* util/grub-menulst2cfg.c (main): Remove useless space skipping.
2012-03-11 14:43:18 +01:00
William Bittner
82f6d455bb * util/import_unicode.py: Add missing brackets around string for
python 3 support.
2012-03-10 20:47:12 +01:00
Vladimir 'phcoder' Serbinenko
ec31677170 Fix IMSM handling on Fedora.
* util/getroot.c (grub_util_is_imsm): New function.
	(grub_util_get_dev_abstraction): Treat IMSM as simple device, not RAID.
2012-03-10 18:01:01 +01:00
Vladimir 'phcoder' Serbinenko
1039c8eba4 * util/grub.d/10_linux.in: Use stat if grub-probe on root fails.
* util/grub.d/20_linux_xen.in: Likewise.
	Based on Debian patch.
2012-03-10 15:21:25 +01:00
Vladimir 'phcoder' Serbinenko
6dd412cdcc * util/grub.d/10_linux.in: Fix syntax error resulting in
Richard Laager's patch.
	* util/grub.d/20_linux_xen.in: Propagate Richard Laager's patch.
2012-03-10 14:42:26 +01:00
Richard Laager
7eea167113 * util/grub.d/10_linux.in: Fix ZFS root passing. 2012-03-10 13:36:08 +01:00
Vladimir 'phcoder' Serbinenko
e8e0566b0c * grub-core/commands/videoinfo.c: Add TRANSLATORS comments.
* grub-core/commands/xnu_uuid.c: Likewise.
	* grub-core/loader/efi/appleloader.c: Likewise.
	* grub-core/script/execute.c: Likewise.
	* grub-core/script/main.c: Likewise.
	* util/grub-mkfont.c: Likewise.
2012-03-10 13:19:46 +01:00
Vladimir 'phcoder' Serbinenko
1acc5b1f3d * util/grub-mkfont.c (options): Use more appropriate "select" that
"set" for face index.
2012-03-10 13:16:41 +01:00
Vladimir 'phcoder' Serbinenko
35d7062040 * util/grub-editenv.c (options): Gettextize command summaries. 2012-03-10 13:12:45 +01:00
Vladimir 'phcoder' Serbinenko
6d790129fa * util/getroot.c (exec_pipe): Ensure that the child is not localised. 2012-03-10 13:05:21 +01:00
Vladimir 'phcoder' Serbinenko
005f46c94a * util/grub-install.in: Check for themes/starfield/theme.txt and not
themes/starfield.
2012-03-10 12:33:52 +01:00
Vladimir 'phcoder' Serbinenko
dd3907779e * util/grub-install.in: Fix install non-PreP IEEE1275 install. 2012-03-09 00:58:55 +01:00
Vladimir 'phcoder' Serbinenko
5fd1c522d4 * grub-core/commands/i386/pc/sendkey.c (GRUB_MOD_INIT): Fix confusing
message.
	* util/grub-install.in: Fix anf gettextize error message.
2012-03-09 00:56:22 +01:00
Vladimir 'phcoder' Serbinenko
fae01f6cfb * util/grub-fstest.c (options): Replace N with NUM and S with STRING.
Gettextize.
	* util/grub-mount.c (options): Likewise.
2012-03-08 19:09:05 +01:00
Vladimir 'phcoder' Serbinenko
61ac50ba80 * util/grub-mkstandalone.in: Propagate grub-mkimage.c change. 2012-03-06 15:53:02 +01:00
Vladimir 'phcoder' Serbinenko
abdd26dd20 * util/grub-install.in: Add missing dot at the end of sentence. 2012-03-06 15:45:30 +01:00
Vladimir 'phcoder' Serbinenko
bb51c6c647 * grub-core/commands/acpi.c: Add TRANSLATORS comments.
* grub-core/commands/gptsync.c: Likewise.
	* grub-core/commands/hashsum.c: Likewise.
	* grub-core/commands/i386/pc/sendkey.c: Likewise.
	* grub-core/commands/legacycfg.c: Likewise.
	* grub-core/io/gzio.c: Likewise.
	* grub-core/net/net.c: Likewise.
	* grub-core/term/gfxterm.c: Likewise.
	* grub-core/term/terminfo.c: Likewise.
	* grub-core/tests/test_blockarg.c: Likewise.
	* grub-core/video/video.c: Likewise.
	* util/grub-install.in: Likewise.
	* util/grub-mkfont.c: Likewise.
2012-03-06 14:11:10 +01:00
Vladimir 'phcoder' Serbinenko
b2b149cbbd * util/grub-mkimage.c (help_filter): Add missing capitalisation. 2012-03-06 14:08:48 +01:00
Vladimir 'phcoder' Serbinenko
f2e243c078 * util/grub-kbdcomp.in: Change "layout" to "keyboard layout" in
description.
2012-03-06 14:06:14 +01:00
Vladimir 'phcoder' Serbinenko
09963c760d * util/grub-script-check.c (main): Fix a syntax error message which was
unclear.
2012-03-06 12:02:38 +01:00
Vladimir 'phcoder' Serbinenko
a50514a887 * util/grub-mkrescue.in (usage): Fix ROM capitalisation. 2012-03-06 12:00:57 +01:00
Vladimir 'phcoder' Serbinenko
97ebda9bc6 * util/grub-fstest.c (options): Remove OPTION_ARG_OPTIONAL from options
without argument.
	* util/grub-mount.c (options): Likewise.
2012-03-06 11:38:50 +01:00
Vladimir 'phcoder' Serbinenko
bbc5a342eb * util/grub-mkimage.c (generate_image): Unify diskboot.img size message. 2012-03-06 11:36:39 +01:00
Vladimir 'phcoder' Serbinenko
ef292a8775 * grub-core/net/http.c: Add TRANSLATORS comments.
* grub-core/normal/cmdline.c: Likewise.
	* grub-core/normal/misc.c: Likewise.
	* grub-core/partmap/msdos.c: Likewise.
	* grub-core/parttool/msdospart.c: Likewise.
	* grub-core/script/execute.c: Likewise.
	* grub-core/script/main.c: Likewise.
	* grub-core/term/terminfo.c: Likewise.
	* grub-core/video/bitmap.c: Likewise.
	* util/grub-install.in: Likewise.
	* util/grub-mkimage.c: Likewise.
	* util/grub-mklayout.c: Likewise.
	* util/grub-setup.c: Likewise.
2012-03-05 16:42:26 +01:00
Vladimir 'phcoder' Serbinenko
0fc19bd089 * util/grub-mount.c (fuse_init): Unify cryptomount and loopback messages
with similar messages in grub-fstest.
2012-03-05 16:39:16 +01:00
Vladimir 'phcoder' Serbinenko
d95862ef75 * util/grub-install.in: Unify "option requires an argument" message
with similar messages in other files.
	* util/grub-mkconfig.in: Likewise.
2012-03-05 16:37:29 +01:00
Vladimir 'phcoder' Serbinenko
b7308f90f5 * util/grub-set-default.in: Replace printf with gettext_printf (the
string in in question is already translated from grub-reboot)
2012-03-05 16:31:05 +01:00
Vladimir 'phcoder' Serbinenko
32bd735bd6 * util/grub-reboot.in (usage): Mention id posibility.
* util/grub-set-default.in (usage): Likewise.
2012-03-05 01:19:42 +01:00
Vladimir 'phcoder' Serbinenko
93b1cd79c8 Use sort -V by the idea of Georgi Georgiev.
* util/grub-mkconfig_lib.in (version_sort): New function.
	(version_test_numeric): Use version_sort.
2012-03-04 23:13:16 +01:00
Vladimir 'phcoder' Serbinenko
0cdc126ca2 Use submenus in grub-mkconfig.
* util/grub-mkconfig.in: Define GRUB_ACTUAL_DEFAULT.
	* util/grub-mkconfig_lib.in (grub_quote): New function.
	(gettext_printf): Use gettext and not gettext_quoted to fix several
	messages.
	* util/grub.d/10_hurd.in: Use submenus.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
	* util/grub.d/10_illumos.in: Add missing quoting.
	* util/grub.d/10_windows.in: Likewise.
2012-03-04 22:18:33 +01:00
Vladimir 'phcoder' Serbinenko
d9bef9bc43 Fix menu title instability bug.
* grub-core/commands/menuentry.c (options): New option --id.
	(grub_normal_add_menu_entry): New argument id. All users updated.
	(grub_cmd_menuentry): Handle --id.
	(grub_menu_init): Accept unknown arguments.
	* grub-core/normal/main.c (features): Add feature_menuentry_id and
	feature_menuentry_options.
	* grub-core/normal/menu.c (grub_menu_execute_entry): Use id for
	saved_entry.
	(get_entry_number): Match with id as well.
	* include/grub/menu.h (grub_menu_entry): New member id.
	* util/grub-mkconfig_lib.in (grub_get_device_id): New function.
	* util/grub.d/00_header.in: Define menuentry_id_option.
	* util/grub.d/10_hurd.in: Define id.
	* util/grub.d/10_illumos.in: Likewise.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
2012-03-04 14:55:13 +01:00
Vladimir 'phcoder' Serbinenko
49de079bbe * grub-core/disk/diskfilter.c (is_lv_readable): New argument "easily".
All users updated. If easily=1 require raid-5/-6 to be full.
	(is_node_readable): Likewise.
	(scan_devices): Scan incomplete but readable LVs at the end.
	(grub_diskfilter_memberlist): Pull missing devices.
	(insert_array): Skip scanning until device is complete or scan is
	done otherwise.
	* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Fix wrong
	check.
	* include/grub/diskfilter.h (grub_diskfilter_lv): New member scanned.
	* util/raid.c (grub_util_raid_getmembers): Handle "removed" disks.
2012-03-04 01:33:09 +01:00
Vladimir 'phcoder' Serbinenko
32107ec02a * util/grub-install.in: Load efivars unconditionally. 2012-03-03 23:15:18 +01:00
Vladimir 'phcoder' Serbinenko
805a8dccc8 * grub-core/commands/gptsync.c: Fix typographic quoting.
* grub-core/commands/ieee1275/suspend.c: Likewise.
	* grub-core/commands/parttool.c: Likewise.
	* grub-core/commands/search_wrap.c: Likewise.
	* grub-core/commands/videoinfo.c: Likewise.
	* grub-core/gfxmenu/gui_label.c: Likewise.
	* grub-core/hello/hello.c: Likewise.
	* grub-core/kern/emu/main.c: Likewise.
	* grub-core/net/net.c: Likewise.
	* grub-core/normal/menu.c: Likewise.
	* grub-core/normal/menu_text.c: Likewise.
	* grub-core/normal/misc.c: Likewise.
	* util/grub-editenv.c: Likewise.
	* util/grub-install.in: Likewise.
	* util/grub-kbdcomp.in: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mkstandalone.in: Likewise.
	* util/grub-reboot.in: Likewise.
	* util/grub-set-default.in: Likewise.
	* util/grub-setup.c: Likewise.
	* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
2012-03-03 13:05:08 +01:00
Vladimir 'phcoder' Serbinenko
0c7d99c7c2 * grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add TRANSLATORS comment.
* util/grub-install.in: Add missing quote in the comment.
2012-03-02 21:08:38 +01:00
Vladimir 'phcoder' Serbinenko
e7d2559bc1 * grub-core/commands/i386/pc/drivemap.c: Add TRANSLATORS comments.
* grub-core/commands/lsmmap.c: Likewise.
	* grub-core/commands/minicmd.c: Likewise.
	* grub-core/commands/mips/loongson/lsspd.c: Likewise.
	* grub-core/commands/regexp.c: Likewise.
	* grub-core/gdb/gdb.c: Likewise.
	* grub-core/term/gfxterm.c: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mkfont.c: Likewise.
	* util/grub-mklayout.c: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
2012-03-02 15:09:10 +01:00
Vladimir 'phcoder' Serbinenko
e4b791fabe * util/getroot.c (grub_make_system_path_relative_to_its_root): Fix
absolutely unclear error message.
2012-03-02 14:58:53 +01:00
Vladimir 'phcoder' Serbinenko
fd1265cb29 * util/grub-mkstandalone.in: Remove confusing leftover print. 2012-03-02 14:56:47 +01:00
Vladimir 'phcoder' Serbinenko
8822a8a02b * grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add TRANSLATORS
comments.
	* grub-core/gdb/gdb.c (grub_cmd_gdbstub): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* grub-core/loader/i386/linux.c (grub_cmd_linux): Clarify that it's
	VGA mode.
	* grub-core/net/net.c (grub_net_route_address): Add TRANSLATORS
	comments.
	* util/grub-install.in (usage): Likewise.
	Spell ID in whole letters.
	Add missing ending dot.
	Quote variables.
	* util/grub-reboot.in: Fix capitalisation.
	* util/grub-set-default.in: Likewise.
2012-03-02 11:53:50 +01:00
Vladimir 'phcoder' Serbinenko
937fd0cc0c * util/getroot.c (strip_extra_slashes) [CYGWIN]: #ifdef-out.
(exec_pipe) [CYGWIN || MINGW32]: Likewise.
	(find_root_devices_from_poolname) [CYGWIN || MINGW32]: Likewise.
	(find_root_devices_from_libzfs) [CYGWIN || MINGW32]: Likewise.
	Disable -Werror for -Wdeprecated-declarations.
	(grub_guess_root_devices) [CYGWIN || MINGW32]: #ifdef-out.
	(get_dm_uuid) [!HAVE_DEVICE_MAPPER]: Likewise.
	(grub_util_get_dm_abstraction) [! __linux__]: #ifdef-out.
	(grub_util_get_grub_dev): Make luks handling dependent on
	HAVE_DEVICE_MAPPER and not __linux__.
	(get_win32_path): Fix format security.
	(grub_find_zpool_from_dir) [CYGWIN || MINGW32]: #ifdef-out.
	(grub_make_system_path_relative_to_its_root) [CYGWIN || MINGW32]:
	Don't try grub_find_zpool_from_dir.
	(grub_make_system_path_relative_to_its_root) [!__linux__]:
	#ifdef-out paresdir.
2012-03-02 11:36:07 +01:00
Vladimir 'phcoder' Serbinenko
1bab1ae335 * util/grub-pe2elf.c (usage): Add missing noreturn.
(write_section_data): Rename name to shname to avoid shadowing.
	(write_symbol_table): Rename name to symname to avoid shadowing.
	Fix write_reloc_section call.
2012-03-02 11:27:48 +01:00
Vladimir 'phcoder' Serbinenko
48afcb75fa * util/ieee1275/ofpath.c (my_isdigit): New function.
(trailing_digits): Use my_isdigit.
	(strip_trailing_digits): Likewise.
2012-03-02 11:21:01 +01:00
Vladimir 'phcoder' Serbinenko
88d51eff35 * util/resolve.c (read_dep_list): Use grub_isspace instead of isspace.
* grub-core/kern/emu/hostdisk.c (read_device_map): Likewise.
2012-03-02 11:18:11 +01:00
Vladimir 'phcoder' Serbinenko
9cc3ee5c2b * util/grub-install.in: Add missing gettext init.
* util/grub-kbdcomp.in: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mkstandalone.in: Likewise.
	* util/grub-reboot.in: Likewise.
	* util/grub-set-default.in: Likewise.
	* util/grub.d/00_header.in: Likewise.
	* util/grub.d/10_hurd.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
	* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
2012-03-01 00:40:02 +01:00
Vladimir 'phcoder' Serbinenko
9d742bd431 * util/grub-mkimagexx.c (locate_sections): Support non-standard
ELF section gap.
	(load_image): Likewise.
2012-02-29 18:57:43 +01:00
Vladimir 'phcoder' Serbinenko
434814814b * util/getroot.c [__APPLE__]: Add missing includes.
(grub_util_biosdisk_is_floppy): Fix usage of undefined variable.
2012-02-29 14:14:08 +01:00
Vladimir 'phcoder' Serbinenko
3cb38f015f * util/grub-mkimage.c (generate_image): Silence spurious warning. 2012-02-29 14:12:41 +01:00
Vladimir 'phcoder' Serbinenko
d9dbf11e16 * util/ieee1275/ofpath.c: Rename devname to sys_devname everywhere to
avoid conflicts.
2012-02-29 14:10:04 +01:00
Vladimir 'phcoder' Serbinenko
0c42a45dcc * util/ieee1275/grub-ofpathname.c: Add missing config.h include. 2012-02-29 14:08:58 +01:00
Vladimir 'phcoder' Serbinenko
46c34eb096 * util/grub-setup.c (setup) [!__linux__]: Add missing file declaration
and grub_file_close call.
2012-02-29 14:07:53 +01:00
Vladimir 'phcoder' Serbinenko
99ce1597a4 Add LZSS Mach-O support (needed for new xnu kernelcache).
* grub-core/Makefile.core.def (xnu): Add file lzss.c
	* grub-core/loader/lzss.c: New file.
	* grub-core/loader/xnu.c (grub_xnu_load_driver): Close binaryfile
	on Mach-O open failure.
	* grub-core/loader/macho.c (grub_macho_close): Free uncompressedXX.
	Don't free cmdsXX in uncompressedXX is set.
	(grub_macho_file): Init new fields.
	New argument is_64bit. All users updated.
	Handle compressed. Error out if no suitable architecture is found.
	Don't close file.
	(grub_macho_open): New argument is_64bit. All users updated.
	* grub-core/loader/macho32.c: Add defines for new fields.
	* grub-core/loader/macho64.c: Likewise.
	* grub-core/loader/machoXX.c (grub_macho_contains_macho): Make static.
	(grub_macho_parse): Handle compressed.
	Defer actual processing if compressed.
	(grub_macho_cmds_iterate): Decompress if compressed. New argument
	"filename". All users updated.
	(grub_macho_size): New argument "filename". All users updated.
	(grub_macho_get_entry_point): Likewise.
	(grub_macho_load): Handle compressed.
	* include/grub/macho.h (grub_macho_lzss_header): New struct.
	(GRUB_MACHO_LZSS_OFFSET): New define.
	(grub_decompress_lzss): New proto.
	* include/grub/machoload.h (grub_macho_file): New fields to handle
	compressed.
	(grub_macho_contains_macho64): Remove proto.
	(grub_macho_contains_macho32): Likewise.
	* util/grub.d/30_os-prober.in: Use kernel cache if available.
2012-02-29 13:26:13 +01:00
Vladimir 'phcoder' Serbinenko
2702b4e4f7 Fix make dist.
* Makefile.am (starfield_theme_files): New var.
	(starfield_DATA): Use starfield_theme_files.
	(EXTRA_DIST): Add starfield_theme_files. Add starfield source files.
	Add bootcheck-related files.
	* conf/Makefile.extra-dist (EXTRA_DIST): Add several missing files.
	* docs/Makefile.am (EXTRA_DIST): Add font_char_metrics.png
	and font_char_metrics.txt.
	* grub-core/Makefile.core.def (kernel): Update extra_dist.
	(setjmp): Add lib/ia64/longjmp.S.
	* po/Makefile.in.in (DISTFILES): Add POTFILES-shell.in and grub.d.sed.
	* po/POTFILES.in: Regenerate.
	* po/Rules-swiss: use DISTFILES.common.extra2 and not
	DISTFILES.common.extra1.
	* util/devicemap.c: Removed.
	* grub-core/lib/i386/relocator_backward.S: Likewise.
	* util/import_gcry.py: Remove unused files. Add extra_dist for
	ChangeLog.
2012-02-28 12:58:57 +01:00
Vladimir 'phcoder' Serbinenko
7931dddfb8 * util/getroot.c (grub_find_root_devices_from_btrfs): Add
missing initialisation.
2012-02-28 04:25:13 +01:00
Colin Watson
e3c78337c3 * include/grub/partition.h (grub_partition_map): Change prototype of
embed to take a maximum value for nsectors.
	* include/grub/emu/hostdisk.h (grub_util_ldm_embed): Likewise.
	* include/grub/fs.h (grub_fs): Likewise.
	* grub-core/partmap/msdos.c (embed_signatures): New array.
	(pc_partition_map_embed): Check for and avoid sectors matching any
	of the signatures in embed_signatures, up to max_nsectors.
	* grub-core/partmap/gpt.c (gpt_partition_map_embed): Restrict
	returned sector map to max_nsectors.
	* grub-core/disk/ldm.c (grub_util_ldm_embed): Likewise.
	* grub-core/fs/btrfs.c (grub_btrfs_embed): Likewise.
	* grub-core/fs/zfs/zfs.c (grub_zfs_embed): Likewise.
	* util/grub-setup.c (setup): Allow for the embedding area being
	split into multiple blocklists.  Tell dest_partmap->embed the
	maximum number of sectors we care about.
2012-02-27 22:25:39 +01:00
Vladimir 'phcoder' Serbinenko
e1e49678b9 * util/grub-install.in: Clarify strings.
Fix source dir check.
2012-02-27 21:36:58 +01:00
Vladimir 'phcoder' Serbinenko
984b973ffc * util/grub-install.in: Clarify strings.
Fix source dir check.
2012-02-27 21:31:58 +01:00
Richard Laager
f122e0d648 * util/getroot.c (grub_find_root_devices_from_mountinfo): Handle
"zfs" and "fuse.zfs" as synonyms.
2012-02-27 20:14:26 +01:00
Richard Laager
817e6abcd0 * util/grub.d/10_linux.in: Add ZFS-related arguments.
* util/grub.d/20_linux_xen.in: Likewise.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2012-02-27 19:07:09 +01:00
Richard Laager
897b741978 * util/getroot.c (find_root_devices_from_poolname): Handle vdevs
with full paths.
2012-02-27 17:42:48 +01:00
Richard Laager
a414bd1565 * util/getroot.c (grub_find_root_devices_from_mountinfo): Add missing
unescape.
2012-02-27 17:40:38 +01:00
Vladimir 'phcoder' Serbinenko
30ac48c452 Don't use insecure popen in getroot.
* util/getroot.c (get_mdadm_uuid): Move pipe logic to ...
	(exec_pipe): ... here.
	(find_root_devices_from_poolname): Use exec_pipe.
2012-02-27 17:37:23 +01:00
Vladimir 'phcoder' Serbinenko
53f13848f1 Remove platform and target_cpu replacement.
* configure.ac: Remove platform and target_cpu substitutions.
	* tests/util/grub-shell.in: Use modinfo.
	* util/powerpc/ieee1275/grub-mkrescue.in: Specify powerpc-ieee1275
	explicitly.
2012-02-27 16:46:52 +01:00
Vladimir 'phcoder' Serbinenko
90cb2803d4 Autodetect platform in grub-install but allow override.
* util/grub-install.in: Autodetect platform. Support --target and
	--directory. Read platform from modinfo.sh.
2012-02-27 16:06:18 +01:00
Vladimir 'phcoder' Serbinenko
b913642798 Support btrfs multi-volume probe.
* util/getroot.c (btrfs_ioctl_dev_info_args) [__linux__]: New struct.
	(btrfs_ioctl_fs_info_args) [__linux__]: Likewise.
	(BTRFS_IOC_DEV_INFO) [__linux__]: New define.
	(BTRFS_IOC_FS_INFO) [__linux__]: Likewise.
	(grub_find_root_devices_from_btrfs) [__linux__]: New function.
	(grub_find_root_devices_from_mountinfo) [__linux__]: Use
	grub_find_root_devices_from_btrfs if on btrfs.
2012-02-27 14:56:28 +01:00
Vladimir 'phcoder' Serbinenko
c36e5cd162 Remove any awareness of *.c util files about target.
* Makefile.util.def (grub-setup): Split to ...
	(grub-bios-setup): ... and this.
	(grub-sparc64-setup): ... and this.
	* configure.ac: Don't add machine_CPPFLAGS into HOST_CPPFLAGS.
	* docs/man/grub-setup.h2m: Split into ...
	* docs/man/grub-sparc64-setup.h2m: ... this.
	* docs/man/grub-bios-setup.h2m: ... and this.
	* include/grub/dl.h (grub_dl) [GRUB_UTIL]: Remove struct.
	* include/grub/elf.h (Elf_*) [GRUB_UTIL]: Remove types.
	(GRUB_TARGET_WORDSIZE) [GRUB_UTIL]: Remove.
	(grub_target_addr_t): Remove.
	(grub_target_size_t): Remove.
	(grub_target_ssize_t): Remove.
	* util/grub-install.in: Use new grub-*-setup.
	* util/grub-mkimagexx.c (Elf_Word): New define.
	(Elf_Half): Likewise.
	(Elf_Section): Likewise.
	(ELF_ST_TYPE): Likewise.
	* util/grub-setup.c: Switch from GRUB_MACHINE_SPARC64 to
	GRUB_SETUP_SPARC64 and from GRUB_MACHINE_PCBIOS to GRUB_SETUP_BIOS.
2012-02-27 14:24:22 +01:00
Vladimir 'phcoder' Serbinenko
6a3131243a * util/grub-mknetdir.in (grub_prefix): Removed.
(subdir): Use @bootdirname@ and @grubdirname@.
2012-02-27 11:08:17 +01:00
Vladimir 'phcoder' Serbinenko
2311c5caa9 Replace PACKAGE_TARNAME with PACKAGE in pkglibdir and pkgdatadir. 2012-02-27 11:04:50 +01:00
Vladimir 'phcoder' Serbinenko
8151bc82f7 Remove improper use of program_transform_name on pkglibrootdir.
* configure.ac (pkglibrootdir): Removed.
	(grub-mkimage): Replace PKGLIBROOTDIR with PKGLIBDIR.
	* util/grub-mkimage.c: Likewise.
2012-02-27 10:35:37 +01:00