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