]>
git.ipfire.org Git - thirdparty/grub.git/log
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 22:48:34 +0000 (23:48 +0100)]
* grub-core/commands/lsacpi.c (disp_acpi_xsdt_table): #if'-out the
checks which are always false on some platforms.
(grub_cmd_lsacpi): Likewise.
* grub-core/kern/misc.c (grub_strtoul): Likewise.
* grub-core/loader/multiboot.c (grub_multiboot_set_video_mode):
Likewise.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 22:43:43 +0000 (23:43 +0100)]
* grub-core/disk/diskfilter.c (read_segment): Renome unreachable code.
* grub-core/net/ip.c (grub_net_recv_ip4_packets): Likewise.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 22:40:17 +0000 (23:40 +0100)]
* grub-core/gnulib/regex.h (re_pattern_buffer): Declare buffer as
re_dfa_t to avoid breaking alignment invariants.
* grub-core/gnulib/regex_internal.h (re_dfa_t): Moved to ...
* grub-core/gnulib/regex.h (re_dfa_t): ... here.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 22:32:03 +0000 (23:32 +0100)]
* grub-core/loader/i386/xnu.c (grub_xnu_boot): Fix printf.
* grub-core/loader/ia64/efi/linux.c (grub_cmd_fpswa): Likewise.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 22:25:14 +0000 (23:25 +0100)]
* grub-core/kern/i386/qemu/mmap.c (grub_machine_mmap_init):
Fix declaration.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 22:18:53 +0000 (23:18 +0100)]
* grub-core/bus/usb/ehci.c (grub_ehci_ehcc_read32): Restructure to
conserve alignment invariants.
(grub_ehci_ehcc_read16): Likewise.
(grub_ehci_oper_read32): Likewise.
(grub_ehci_oper_write32): Likewise.
(grub_ehci_pci_iter) [!GRUB_HAVE_UNALIGNED_ACCESS]: Check alignment.
Conserve alignment invariants.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 22:15:27 +0000 (23:15 +0100)]
* grub-core/kern/emu/full.c (grub_emu_post_init): Remove raid reinit.
* include/grub/disk.h [GRUB_MACHINE_EMU]: Remove now useless LVM/RAID
declarations.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 22:12:09 +0000 (23:12 +0100)]
* grub-core/kern/emu/hostfs.c (grub_hostfs_close):
Remove unused variable.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 21:57:51 +0000 (22:57 +0100)]
* grub-core/efiemu/loadcore_common.c (grub_efiemu_loadcore_load):
Remove set in if.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 21:44:28 +0000 (22:44 +0100)]
* include/grub/net.h: Remove double declarations.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 14:09:40 +0000 (15:09 +0100)]
Remove "payload" command in ia64 Linux loader since I couldn't
find any evidence of it being used for anything.
Replace "relocate" command with an environment variable
* grub-core/loader/ia64/efi/linux.c (ia64_boot_param): Remove extra
fields.
(ia64_boot_payload): Removed.
(last_payload): Likewise.
(RELOCATE_OFF): Likewise.
(RELOCATE_ON): Likewise.
(RELOCATE_FORCE): Likewise.
(relocate): Likewise.
(free_pages): Don't free payloads.
(grub_load_elf64): Use common error messages.
Use "linux_relocate" variable.
Increase the space after boot_params.
(grub_cmd_payload): Removed.
(grub_cmd_relocate): Likewise.
(grub_cmd_fpswa): Improve messages.
(cmd_payload): Removed.
(cmd_relocate): Likewise.
(GRUB_MOD_INIT): Don't register "payload" and "relocate".
(GRUB_MOD_FINI): Don't unregister "payload" and "relocate".
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 14:00:05 +0000 (15:00 +0100)]
Convert UHCI to DMA framework.
* grub-core/bus/usb/uhci.c (grub_uhci): Add chunk and phys members.
(grub_uhci_pci_iter): Fill new members
(grub_alloc_td): Use P2V and V2P functions.
(grub_free_queue): Likewise.
(grub_alloc_qh): Likewise.
(grub_uhci_setup_transfer): Likewise.
(grub_uhci_check_transfer): Likewise.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 13:48:35 +0000 (14:48 +0100)]
* grub-core/video/colors.c (grub_video_parse_color): Fix error message.
Remove assignment in if while on it.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 13:45:56 +0000 (14:45 +0100)]
* util/grub-mkstandalone.in: Fix modules directory.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 13:43:21 +0000 (14:43 +0100)]
* util/grub-mkimage.c (image_targets): Set default_compression to lzma
on i386-pc target.
(argp_parser): Accept "auto" as compression specification.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 13:38:34 +0000 (14:38 +0100)]
Fix `help' with unloaded modules.
* include/grub/normal.h (grub_dyncmd_get_cmd): New proto.
* grub-core/normal/dyncmd.c (grub_dyncmd_get_cmd): New function.
(grub_dyncmd_dispatcher): Small stylistic fix.
* grub-core/commands/help.c (grub_cmd_help): Load missing modules when
explicit help is requested.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 13:27:05 +0000 (14:27 +0100)]
* grub-core/fs/cpio.c (grub_cpio_dir): Fix a bug with multiple listing.
Explicitly init restart while on it.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 13:24:55 +0000 (14:24 +0100)]
* grub-core/lib/posix_wrap/wchar.h (mbrtowc): Set pwc to zero to avoid
uninited variable.
Vladimir 'phcoder' Serbinenko [Wed, 8 Feb 2012 19:27:46 +0000 (20:27 +0100)]
* util/grub-mknetdir.in: Use . rather than source for POSIX
compatibility.
Vladimir 'phcoder' Serbinenko [Wed, 8 Feb 2012 19:23:53 +0000 (20:23 +0100)]
* util/grub-probe.c (main): Fix trailing space in compatibility hint.
Vladimir 'phcoder' Serbinenko [Wed, 8 Feb 2012 19:19:44 +0000 (20:19 +0100)]
* grub-core/kern/partition.c (grub_partition_get_name): Fix uninited
variable.
Vladimir 'phcoder' Serbinenko [Wed, 8 Feb 2012 19:12:41 +0000 (20:12 +0100)]
* grub-core/commands/hdparm.c (grub_cmd_hdparm): Accept device name
without quotes.
Vladimir 'phcoder' Serbinenko [Wed, 8 Feb 2012 19:10:17 +0000 (20:10 +0100)]
* grub-core/net/net.c (GRUB_MOD_INIT): Don't register netfs.
Vladimir 'phcoder' Serbinenko [Wed, 8 Feb 2012 18:53:46 +0000 (19:53 +0100)]
* grub-core/kern/partition.c (grub_partition_get_name): Fix reverse
iteration of partitions.
Vladimir 'phcoder' Serbinenko [Wed, 8 Feb 2012 18:26:01 +0000 (19:26 +0100)]
Improve gettext support. Stylistic fixes and error handling fixes while
on it.
Vladimir 'phcoder' Serbinenko [Tue, 7 Feb 2012 21:31:14 +0000 (22:31 +0100)]
* grub-core/lib/i386/relocator16.S: Revert moving A20 code into PM
part. Instead setup the correct stack in RM.
* grub-core/lib/i386/relocator.c (grub_relocator16_boot): Reserve place
for stack.
* include/grub/i386/relocator_private.h: New file.
Vladimir 'phcoder' Serbinenko [Sun, 5 Feb 2012 10:32:11 +0000 (11:32 +0100)]
* grub-core/commands/minicmd.c (GRUB_MOD_INIT): Add missing SIZE
argument.
* util/grub-fstest.c (options): Add missing DEVICE part.
Vladimir 'phcoder' Serbinenko [Sun, 5 Feb 2012 10:23:47 +0000 (11:23 +0100)]
Clarify and unify messages.
* grub-core/commands/hashsum.c (options): Unify messages.
* grub-core/commands/keystatus.c (GRUB_MOD_INIT): Don't mark a
literal-only message as translatable.
* grub-core/commands/lsacpi.c (GRUB_MOD_INIT): Likewise.
* grub-core/loader/ia64/efi/linux.c (GRUB_MOD_INIT): Likewise.
* grub-core/commands/legacycfg.c (GRUB_MOD_INIT): Add quoting around
commands.
* grub-core/commands/menuentry.c (options): Clarify that it's a keyboard
key, not the key used to unlock. Clarify what it's used for.
* grub-core/kern/emu/hostdisk.c (read_device_map): Unify error message.
* grub-core/loader/xnu.c (grub_xnu_load_driver): Remove erroneous colon.
* grub-core/script/main.c (GRUB_MOD_INIT): Clarify [n] to be [NUM].
* util/grub-editenv.c (options): Unify "verbose" message.
* util/grub-fstest.c (read_file): Unify error message.
(fstest): Add quotes around commands.
(options): Unify "verbose" message.
* util/grub-install.in: Add quotes around variable name.
* util/grub-kbdcomp.in: Unify error message.
* util/grub-mkfont.c (main): Likewise.
* util/grub-mkrescue.in: Likewise.
* util/grub-mklayout.c (options): Unify "verbose" message.
* util/grub-mkstandalone.in: Unify help and verbose messages.
* util/grub-mount.c (options): Unify "verbose" message.
* util/grub-probe.c (options): Likewise.
* util/grub-script-check.c (options): Likewise.
* util/grub-setup.c (setup): Unify no-terminator message.
(options): Use DEVICE and not DEV.
Unify "verbose" message.
* util/ieee1275/ofpath.c (xrealpath): Unify error message.
Vladimir 'phcoder' Serbinenko [Sun, 5 Feb 2012 10:07:33 +0000 (11:07 +0100)]
Improve and unify messages.
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): Add argument
name. All users updated.
Print filename in error.
(read_device_map): Print filename in error.
* util/getroot.c (grub_guess_root_devices): Print filename in error.
(grub_util_get_os_disk): Likewise.
(grub_util_biosdisk_get_grub_dev): Likewise.
(grub_util_check_block_device): Likewise.
(grub_util_check_char_device): Likewise.
(grub_make_system_path_relative_to_its_root): Likewise.
* util/grub-editenv.c (create_envblk_file): Likewise.
(open_envblk_file): Likewise.
(write_envblk): Likewise.
* util/grub-fstest.c (cmd_cp): Likewise.
(cmd_cat): Likewise.
(cmd_cmp): Likewise.
* util/grub-menulst2cfg.c (main): Likewise.
* util/grub-mkfont.c (write_font_ascii_bitmap): Likewise.
(write_font_width_spec): Likewise.
(write_font_pf2): Likewise.
* util/grub-mkimage.c (generate_image): New argument outname.
All users updated.
Remove unreacheable message.
(options): Unify messages.
(help_filter): Likewise.
* util/grub-mklayout.c (usage): Removed (unused).
(main): Print filename in error.
* util/grub-mkrescue.in: Fix wrong quoting.
* util/grub-setup.c (setup): Print filename in error.
* util/ieee1275/ofpath.c (vendor_is_ATA): Likewise.
(check_sas): Likewise.
* util/misc.c (grub_util_get_fp_size): Removed.
(grub_util_get_image_size): Print filename in error.
(grub_util_read_at): Removed.
(grub_util_read_image): Print filename in error.
(grub_util_load_image): Likewise.
(grub_util_write_image_at): New argument filename. All users updated.
Print filename in error.
(grub_util_write_image): New argument filename. All users updated.
Print filename in error.
* util/raid.c (grub_util_raid_getmembers): Print filename in error.
* util/resolve.c (grub_util_resolve_dependencies): Likewise.
Vladimir 'phcoder' Serbinenko [Sun, 5 Feb 2012 09:33:52 +0000 (10:33 +0100)]
* grub-core/Makefile.core.def (pxechain): New module.
* grub-core/loader/i386/pc/pxechainloader.c: New file.
* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_get_cached): New
function.
(grub_pc_net_config_real): Use grub_pxe_get_cached.
* include/grub/i386/pc/pxe.h (grub_pxe_get_cached): New proto.
Vladimir 'phcoder' Serbinenko [Sun, 5 Feb 2012 09:24:53 +0000 (10:24 +0100)]
* grub-core/kern/err.c (GRUB_MAX_ERRMSG): Move to ...
* include/grub/err.h (GRUB_MAX_ERRMSG): ... here.
* include/grub/err.h (grub_error_saved): New struct.
(grub_errmsg): Make array size explicit.
* include/grub/misc.h (grub_error_save): New function.
(grub_error_load): Likewise.
* grub-core/kern/err.c (grub_error_stack_items): Use grub_error_saved.
(grub_error_push): Update `errno' member name.
(grub_error_pop): Likewise
* grub-core/net/tftp.c (tftp_data): New member save_err.
(tftp_receive): Save error.
(tftp_open): Restore error.
Vladimir 'phcoder' Serbinenko [Sun, 5 Feb 2012 09:12:18 +0000 (10:12 +0100)]
* grub-core/lib/i386/relocator16.S (grub_relocator16_start): Move switch
to real mode down to execute A20-related code in protected mode as
intended.
Grégoire Sutre [Sun, 5 Feb 2012 00:22:04 +0000 (01:22 +0100)]
* grub-core/disk/diskfilter.c (grub_diskfilter_make_raid): Return
NULL when the argument `level' has an unexpected value.
Vladimir 'phcoder' Serbinenko [Sat, 4 Feb 2012 20:47:29 +0000 (21:47 +0100)]
Move platform-dependent files from $prefix to $prefix/$platform.
* config.h.in (GRUB_TARGET_CPU): New definition.
(GRUB_PLATFORM): Likewise.
* configure.ac: Define GRUB_TARGET_CPU and GRUB_PLATFORM.
* grub-core/commands/parttool.c (grub_cmd_parttool): Update dir.
* grub-core/efiemu/main.c (grub_efiemu_autocore): Likewise.
* grub-core/kern/dl.c (grub_dl_load): Likewise.
* grub-core/normal/autofs.c (read_fs_list): Likewise.
* grub-core/normal/crypto.c (read_crypto_list): Likewise.
* grub-core/normal/dyncmd.c (read_command_list): Likewise.
* grub-core/normal/term.c (read_terminal_list): Likewise.
* grub-core/gettext/gettext.c (grub_mofile_open_lang): Use
$prefix/locale.
(grub_gettext_init_ext): Likewise.
* grub-core/normal/main.c (GRUB_MOD_INIT): Define grub_cpu and
grub_platform.
* util/grub-install.in: Update directories.
* util/grub-mknetdir.in: Likewise.
* util/grub-mkrescue.in: Likewise.
Vladimir 'phcoder' Serbinenko [Sat, 4 Feb 2012 13:00:23 +0000 (14:00 +0100)]
* grub-core/kern/ieee1275/openfw.c (grub_claimmap): Change to
grub_error framework. All users updated.
Vladimir 'phcoder' Serbinenko [Sat, 4 Feb 2012 12:35:17 +0000 (13:35 +0100)]
* grub-core/gettext/gettext.c: Mostly rewritten to avoid using
lists (by always binsearching), improve caching (cache strings
used for binsearch, not only results), improve
maintainability (by using more structured binary search) and correct
error handling.
Vladimir 'phcoder' Serbinenko [Sat, 4 Feb 2012 11:21:21 +0000 (12:21 +0100)]
* grub-core/script/execute.c (grub_script_return): Fix warning.
Vladimir 'phcoder' Serbinenko [Sat, 4 Feb 2012 10:52:10 +0000 (11:52 +0100)]
* grub-core/script/execute.c (grub_script_return): Fix potential
NULL-dereference.
Reported by: Jim Meyering.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 21:52:23 +0000 (22:52 +0100)]
* po/POTFILES.in: Regenerate.
* util/grub-install.in: Gettextize the strings missed in first pass.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 21:36:51 +0000 (22:36 +0100)]
* Makefile.util.def (grub-mkdevicemap): Removed.
* include/grub/emu/hostdisk.h (grub_util_get_os_disk): New proto.
* include/grub/util/deviceiter.h: Removed.
* util/deviceiter.c: Likewise.
* util/getroot.c (grub_util_get_os_disk): New function.
* util/grub-install.in: Remove grub-mkdevicemap. Use -t disk as
replacement for EFI.
* util/grub-mkdevicemap.c: Removed.
* util/grub-probe.c (probe): Handle PRINT_DISK.
(argp_parser): Handle -t disk.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 20:45:43 +0000 (21:45 +0100)]
* util/grub-mkfont.c: Migrate to argp.
* util/grub-mklayout.c: Likewise.
* util/grub-mkpasswd-pbkdf2.c: Likewise.
* util/grub-mkrelpath.c: Likewise.
* util/grub-probe.c: Likewise.
* util/grub-script-check.c: Likewise.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 20:30:05 +0000 (21:30 +0100)]
* util/grub-reboot.in: Add missing datarootdir.
Add missing newline.
* util/grub-set-default.in: Add missing datarootdir.
* util/powerpc/ieee1275/grub-mkrescue.in: Add missing newline.
* util/grub-mkrescue.in: Likewise.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 20:25:10 +0000 (21:25 +0100)]
* util/grub.d/30_os-prober.in: Fix TRANSLATORS comment.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 20:22:12 +0000 (21:22 +0100)]
* util/grub-kbdcomp.in: Add decent help and gettextize.
* docs/man/grub-kbdcomp.h2m: New file.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 20:18:37 +0000 (21:18 +0100)]
Migrate grub-mkimage.c to argp.
* Makefile.util.def (grub-mkimage): Add util/argp_common.c.
(grub-setup): Likewise.
* util/grub-setup.c (print_version): Move to ...
* util/argp_common.c (print_version): ... here.
* util/grub-setup.c (argp_program_version_hook): Move to ...
* util/argp_common.c (argp_program_version_hook): ... here.
* util/grub-setup.c (argp_parser): Add exit (1) on fatal error for
safety.
* util/grub-mkimage.c (main): Migrate to argp.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 13:45:45 +0000 (14:45 +0100)]
* util/grub-mkrescue.in: Use same message as
util/powerpc/ieee1275/grub-mkrescue.in with %s in place of command
for better translations.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 13:38:39 +0000 (14:38 +0100)]
* util/powerpc/ieee1275/grub-mkrescue.in: Gettextize. Unify the command
options with generic grub-mkrescue.in with the goal of future
merge.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 13:20:31 +0000 (14:20 +0100)]
* grub-core/kern/mm.c: Add missing include of i18n.h
* grub-core/lib/relocator.c: Likewise.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 12:53:12 +0000 (13:53 +0100)]
* grub-core/loader/ia64/efi/linux.c (find_mmap_size): Replace fatal with
error.
(allocate_pages): Check return value.
Replace fatal with error.
(grub_linux_boot): Replace printf with dprintf.
Check find_mmap_size return value.
Replace fatal with error.
Don't call grub_machine_fini.
(grub_load_elf64): Replace printf with dprintf.
(grub_cmd_linux): Likewise.
(grub_cmd_initrd): Likewise.
(grub_cmd_payload): Likewise.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 11:47:07 +0000 (12:47 +0100)]
* grub-core/loader/i386/xnu.c (grub_cmd_devprop_load): Fix error
message.
* grub-core/video/radeon_fuloong2e.c
(grub_video_radeon_fuloong2e_setup): Likewise.
* grub-core/video/sis315pro.c (grub_video_sis315pro_setup): Likewise.
* grub-core/video/video.c (grub_video_set_mode): Don't override
standard out of memory message.
Grégoire Sutre [Fri, 3 Feb 2012 11:32:21 +0000 (12:32 +0100)]
NetBSD disk wedge support.
Mark Wooding [Fri, 3 Feb 2012 11:15:53 +0000 (12:15 +0100)]
* util/grub-mkconfig.in: Use umask rather than chmod to create
grub.cfg.new to avoid insecure grub.cfg.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 10:56:49 +0000 (11:56 +0100)]
* grub-core/commands/ls.c: Gettextize.
* grub-core/commands/setpci.c: Likewise.
* grub-core/commands/videotest.c: Likewise.
* grub-core/disk/geli.c: Likewise.
* grub-core/kern/mm.c: Likewise.
* grub-core/lib/relocator.c: Likewise.
* grub-core/loader/efi/appleloader.c: Likewise.
* grub-core/loader/i386/xnu.c: Likewise.
* grub-core/loader/ia64/efi/linux.c: Likewise.
* grub-core/loader/xnu.c: Likewise.
* grub-core/net/dns.c: Likewise.
* grub-core/net/net.c: Likewise.
* grub-core/script/lexer.c: Likewise.
* grub-core/script/parser.y: Likewise.
* grub-core/script/yylex.l: Likewise.
* util/getroot.c: Likewise.
* util/grub-setup.c: Likewise.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 10:50:18 +0000 (11:50 +0100)]
* grub-core/fs/reiserfs.c (grub_reiserfs_get_item): Use proper error
number.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 10:48:42 +0000 (11:48 +0100)]
* grub-core/disk/ldm.c (grub_util_ldm_embed): Correct error message.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 10:46:18 +0000 (11:46 +0100)]
* grub-core/commands/search_file.c (SEARCH_TARGET): Remove obsolete
macro.
* grub-core/commands/search_label.c (SEARCH_TARGET): Likewise.
* grub-core/commands/search_uuid.c (SEARCH_TARGET): Likewise.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 10:42:22 +0000 (11:42 +0100)]
* util/grub-mkstandalone.in: Fix help messages. Gettextize.
* util/grub-install.in: Gettextize.
* util/grub-mkconfig.in: Likewise.
* util/grub-mkconfig_lib.in: Replace gettext with echo -n and not echo
if not available.
(grub_warn): Gettextize.
* util/grub-mknetdir.in: Gettextize.
* 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_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.
* po/POTFILES-shell.in: Regenerate.
Richard Laager [Fri, 3 Feb 2012 10:07:18 +0000 (11:07 +0100)]
* util/grub-mkimage.c (main): Fix format-security warning.
* util/grub-mkrelpath.c (main): Likewise.
* util/grub-probe.c (main): Likewise.
Richard Laager [Fri, 3 Feb 2012 10:02:06 +0000 (11:02 +0100)]
* util/grub-probe.c (probe): Don't crash on canonicalize_file_name
failure.
Put back lost PRINT_DRIVE.
Richard Laager [Fri, 3 Feb 2012 09:50:56 +0000 (10:50 +0100)]
* util/getroot.c (find_root_devices_from_libzfs): Fix compilation error.
(grub_guess_root_devices): Replace strlen with sizeof.
Avoid crash.
(find_root_devices_from_poolname): Remove unused variable.
Handle raidzN.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 09:35:28 +0000 (10:35 +0100)]
Support install on multi-device filesystems.
* include/grub/emu/getroot.h (grub_guess_root_device): Renamed to ...
(grub_guess_root_devices): ...this. Return char **. All users updated.
* include/grub/emu/misc.h (grub_find_root_device_from_mountinfo):
Removed.
* util/getroot.c (find_root_device_from_libzfs): Moved pool logic to ...
(find_root_devices_from_poolname): ... here.
(grub_find_root_devices_from_mountinfo): Return char **. Make static.
Support zfs-fuse.
(grub_guess_root_device): Rename to ...
(grub_guess_root_devices): ... this. Return char **. All users updated.
* util/grub-install.in: Handle multi-device filesystems.
* util/grub-probe.c (probe). Make device_names a char **. Add delim
argument. All users updated.
Handle multi-device filesystems.
Use 'delim' as separator.
Remove device check to allow filesystems on file.
(main): Support -0 argument. Handle multi-device.
* util/grub-setup.c (setup): Remove root argument. Handle multi-device.
Fix a cross-device check while on it.
(arguments): Remove root_dev.
(argp_parser): Remove -r.
(main): Remove root_dev.
Vladimir 'phcoder' Serbinenko [Wed, 1 Feb 2012 17:30:51 +0000 (18:30 +0100)]
* grub-core/fs/zfs/zfscrypt.c: Add link to documentation.
Vladimir 'phcoder' Serbinenko [Wed, 1 Feb 2012 16:47:47 +0000 (17:47 +0100)]
* grub-core/commands/videotest.c (grub_cmd_videotest): Fix subset
symbol.
Reported by: NODA, Kai <nodakai>.
Vladimir 'phcoder' Serbinenko [Wed, 1 Feb 2012 15:13:17 +0000 (16:13 +0100)]
Fix ehci on amd64.
* grub-core/bus/usb/usbhub.c (grub_usb_hub_add_dev): Use %p to print
pointers.
* grub-core/bus/usb/ehci.c (grub_ehci_pci_iter): Likewise.
(grub_ehci_setup_qh): Likewise.
(grub_ehci_find_qh): Likewise.
(grub_ehci_transaction): Likewise.
(grub_ehci_setup_transfer): Likewise.
(grub_ehci_check_transfer): Likewise.
(grub_ehci_portstatus): Likewise.
(grub_ehci_detect_dev): Likewise.
(grub_ehci_transfer_controller_data): New field td_last_phys.
(grub_ehci_setup_transfer): Fill td_last_phys.
(grub_ehci_check_transfer): Use td_last_phys.
Seth Goldberg [Wed, 1 Feb 2012 14:35:30 +0000 (15:35 +0100)]
* grub-core/normal/context.c (grub_env_extractor_close): Don't crash
if no submenu is present.
Aleš Nesrsta [Wed, 1 Feb 2012 14:19:10 +0000 (15:19 +0100)]
CBI support.
* include/grub/usb.h (grub_usbms_protocol_t): New values
GRUB_USBMS_PROTOCOL_CB and GRUB_USBMS_PROTOCOL_CBI.
* grub-core/disk/usbms.c (GRUB_USBMS_CBI_CMD_SIZE): New define.
(GRUB_USBMS_CBI_ADSC_REQ): Likewise.
(grub_usbms_dev): Add subclass, protocol and intrpt.
Remove in_maxsz and out_maxsz.
(grub_usbms_reset): Rename to ...
(grub_usbms_bo_reset): .. this.
(grub_usbms_cbi_cmd): New function.
(grub_usbms_cbi_reset): Likewise.
(grub_usbms_reset): Likewise.
(grub_usbms_attach): Recognize cbi. Same subclass and protocol.
(grub_usbms_transfer): Rename to ...
(grub_usbms_transfer_bo): ... this.
(grub_usbms_transfer_cbi): Likewise.
(grub_usbms_transfer): Likewise.
Vladimir 'phcoder' Serbinenko [Wed, 1 Feb 2012 13:30:40 +0000 (14:30 +0100)]
merge mainline into cbi
Aleš Nesrsta [Wed, 1 Feb 2012 13:18:43 +0000 (14:18 +0100)]
EHCI support. All of the credit goes to Aleš Nesrsta. I've just added
the support for the CS5536 modification thereos and few bugfixes.
* grub-core/Makefile.core.def (ehci): New module.
* grub-core/bus/usb/ehci.c: New file.
* grub-core/bus/usb/usbhub.c (grub_usb_hub_add_dev): New arguments
port and hubaddr. All users updated.
Save port and hubaddr into dev structure.
* include/grub/cs5536.h (GRUB_CS5536_MSR_USB_BASE_SMI_ENABLE): New
define.
* include/grub/pci.h (grub_dma_phys2virt): New function.
(grub_dma_virt2phys): Likewise.
* include/grub/usb.h (grub_usb_device): New members port and hubaddr.
Vladimir 'phcoder' Serbinenko [Wed, 1 Feb 2012 13:08:58 +0000 (14:08 +0100)]
Fix type errors. Don't stop after first EHCI controller is found.
Vladimir 'phcoder' Serbinenko [Wed, 1 Feb 2012 12:19:42 +0000 (13:19 +0100)]
merge mainline into ehci
Vladimir 'phcoder' Serbinenko [Tue, 31 Jan 2012 22:26:07 +0000 (23:26 +0100)]
* grub-core/fs/fat.c (grub_fat_mount) [!MODE_EXFAT]: Remove fstype
check as some mkfs implementations omit it.
Vladimir 'phcoder' Serbinenko [Tue, 31 Jan 2012 21:59:32 +0000 (22:59 +0100)]
* docs/grub.texi (Unicode): Mention identifier and space limitations.
Vladimir 'phcoder' Serbinenko [Tue, 31 Jan 2012 21:49:11 +0000 (22:49 +0100)]
* grub-core/fs/jfs.c (grub_jfs_sblock): Make volname a char array.
Add new member volname2.
(grub_jfs_label): Use volname2 if available.
Vladimir 'phcoder' Serbinenko [Tue, 31 Jan 2012 21:43:29 +0000 (22:43 +0100)]
* grub-core/fs/nilfs2.c (grub_nilfs2_super_block): Expand volume_name
over last_mounted as seen in image generated by mkfs.nilfs2.
(grub_nilfs2_label): Use sizeof for the size of s_volume_name.
Vladimir 'phcoder' Serbinenko [Tue, 31 Jan 2012 21:38:08 +0000 (22:38 +0100)]
* grub-core/fs/fat.c (grub_fat_dir_entry) [MODE_EXFAT]: Expand label
to 15 UTF-16 characters as seen in FS generated by mkexfatfs.
(grub_fat_label) [MODE_EXFAT]: Use macros for size.
Vladimir 'phcoder' Serbinenko [Tue, 31 Jan 2012 21:25:07 +0000 (22:25 +0100)]
* grub-core/fs/romfs.c (grub_romfs_mount): Fix a bug with labels going
over the sector.
Vladimir 'phcoder' Serbinenko [Tue, 31 Jan 2012 21:20:37 +0000 (22:20 +0100)]
* grub-core/fs/zfs/zfs.c (get_filesystem_dnode): Support space in
subvolume name (by removing a bogus and useless check).
Vladimir 'phcoder' Serbinenko [Tue, 31 Jan 2012 21:12:57 +0000 (22:12 +0100)]
* grub-core/fs/ext2.c (grub_ext2_label): Fix field size. Change to
sizeof while on it.
Vladimir 'phcoder' Serbinenko [Mon, 30 Jan 2012 17:33:11 +0000 (18:33 +0100)]
* grub-core/disk/scsi.c (grub_scsi_read_capacity): Renamed to ...
(grub_scsi_read_capacity10): ... this.
(grub_scsi_read_capacity16): New function.
(grub_scsi_open): Use read_capacity16 if read_capacity10 returned
0xffffffff.
Fix off-by-one error.
* include/grub/scsi.h (grub_scsi): Rename size to last_block and make it
64-bit unsigned.
* include/grub/scsicmd.h (grub_scsi_read_capacity): Rename to ...
(grub_scsi_read_capacity10): ... this.
(grub_scsi_read_capacity_data): Rename to ...
(grub_scsi_read_capacity10_data): ... this. Rename size to last_block.
(grub_scsi_read_capacity16): New struct.
(grub_scsi_read_capacity16_data): Likewise.
(grub_scsi_cmd_t): Rename grub_scsi_cmd_read_capacity to
grub_scsi_cmd_read_capacity10.
New command grub_scsi_cmd_read_capacity16.
Vladimir 'phcoder' Serbinenko [Mon, 30 Jan 2012 11:47:26 +0000 (12:47 +0100)]
SCSI >2TiB support.
* grub-core/disk/scsi.c (grub_scsi_read16): New function.
(grub_scsi_write16): Likewise.
(grub_scsi_read): Use read16 when necessary.
(grub_scsi_write): Likewise.
* include/grub/scsicmd.h (grub_scsi_read16): New struct.
(grub_scsi_write16): Likewise.
(grub_scsi_cmd_t): Add READ16 and WRITE16.
Vladimir 'phcoder' Serbinenko [Mon, 30 Jan 2012 11:26:11 +0000 (12:26 +0100)]
SCSI write support (for usbms mainly).
* grub-core/disk/scsi.c (grub_scsi_write10): Uncomment. Make buffer
a const pointer.
(grub_scsi_write): Implement.
* include/grub/scsi.h (grub_scsi_dev): Make write buffer a const pointer
Vladimir 'phcoder' Serbinenko [Mon, 30 Jan 2012 00:18:02 +0000 (01:18 +0100)]
* grub-core/io/lzopio.c (uncompress_block): Fix use of incorrect
variable.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 22:58:42 +0000 (23:58 +0100)]
* grub-core/lib/posix_wrap/string.h (memchr): New function.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 22:50:37 +0000 (23:50 +0100)]
* po/POTFILES.in: Regenerate.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 22:48:35 +0000 (23:48 +0100)]
* grub-core/lib/posix_wrap/assert.h (assert_real): Replace grub_fatal
with grub_printf to avoid unnecessary fatal failure.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 22:27:31 +0000 (23:27 +0100)]
* grub-core/lib/posix_wrap/limits.h (SHRT_MAX): New define.
(INT_MAX): Likewise.
* grub-core/lib/posix_wrap/stdio.h (snprintf): New function.
* grub-core/lib/posix_wrap/stdlib.h (abs): Likewise.
* grub-core/lib/posix_wrap/string.h (memcmp): Likewise.
(strcpy): Likewise.
(strstr): Likewise.
(strchr): Likewise.
(strncpy): Likewise.
(strcat): Likewise.
(strncat): Likewise.
(strcoll): Likewise.
* include/grub/types.h (GRUB_SHRT_MAX): New define.
(GRUB_INT_MAX): Likewise.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 22:22:57 +0000 (23:22 +0100)]
* grub-core/gnulib/regcomp.c (regerror): Don't use abort on
unexpected error.
(optimize_utf8): Likewise.
* grub-core/lib/posix_wrap/stdlib.h (abort): Removed.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 22:20:02 +0000 (23:20 +0100)]
* grub-core/boot/i386/pc/lnxboot.S: Use
GRUB_DECOMPRESSOR_MAX_DECOMPRESSOR_SIZE.
* grub-core/boot/i386/pc/startup_raw.S: Ensure about boot_dev
location.
* include/grub/offsets.h (GRUB_DECOMPRESSOR_I386_PC_BOOT_DEVICE): New
definition.
(GRUB_DECOMPRESSOR_I386_PC_MAX_DECOMPRESSOR_SIZE): Likewise.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 20:49:44 +0000 (21:49 +0100)]
* util/getroot.c (grub_util_get_dm_node_linear_info): Fix memory leak.
* grub-core/disk/cryptodisk.c (cryptodisk_cleanup): Disable for
now to avoid double free.
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_dev): Rename to
hostdisk.
* include/grub/disk.h (grub_disk_dev_id): New id HOSTDISK.
* util/grub-probe.c (escape_of_path): Always return a new copy.
(print_full_name): Escape path.
(probe): Don't call grub_util_devname_to_ofpath on NULL.
Fix hints on abstractions.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 19:52:37 +0000 (20:52 +0100)]
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device):
Don't add "root" line if no compatibility hont is available.
Suggested by: Seth Goldberg.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 18:00:30 +0000 (19:00 +0100)]
* include/grub/ata.h (grub_ata): Add a new element maxbuffer.
* grub-core/disk/ata.c (grub_ata_readwrite): Limit to ata->maxbuffer.
* grub-core/disk/pata.c (grub_pata_open): Set ata->maxbuffer.
* grub-core/disk/ahci.c (grub_ahci_open): Likewise.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 17:56:44 +0000 (18:56 +0100)]
* include/grub/zfs/dnode.h (DN_MIN_INDBLKSHIFT): Removed.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 17:53:38 +0000 (18:53 +0100)]
* util/grub-pe2elf.c (ehdr): Make static.
(shdr): Likewise.
(num_sections): Likewise.
(offset): Likewise.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 17:51:21 +0000 (18:51 +0100)]
Eliminate ofpath limits and possible overflows.
* util/ieee1275/ofpath.c (grub_util_info) [STANDALONE]: New function.
(OF_PATH_MAX): Removed.
(MAX_DISK_CAT): New const.
(find_obppath): Use allocated rather than preallocated buffer.
Return result. Argument of_path removed. All users updated.
Add missing fdstat.
(xrealpath): New function.
(block_device_get_sysfs_path_and_link): Remove sysfs argument.
Allocate rather than use preallocated buffer. All users updated.
(__of_path_common): Use allocated rather than preallocatecd buffer.
Return result. Argument of_path removed. All users updated.
(vendor_is_ATA): Read only needed part form the file.
(check_sas): Allocate depending on contents rather than fixed.
(main) [STANDALONE]: Handle NULL result.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 17:20:02 +0000 (18:20 +0100)]
* grub-core/normal/completion.c (iterate_dev): Close the disk.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 17:16:48 +0000 (18:16 +0100)]
Cryptodisk write support.
* grub-core/disk/cryptodisk.c (grub_crypto_pcbc_encrypt): New function.
(grub_cryptodisk_decrypt): Moved logic to ...
(grub_cryptodisk_endecrypt): ...this. New argument "encrypt".
(grub_cryptodisk_write): Implement.
* grub-core/kern/emu/hostdisk.c (nwrite): Rename to ...
(grub_util_fd_write): ... this. Make global.
* include/grub/emu/hostdisk.h (grub_util_fd_write): New proto.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 17:09:53 +0000 (18:09 +0100)]
* include/grub/list.h (grub_list_remove): Don't crash if element is
removed twice.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 16:01:27 +0000 (17:01 +0100)]
Rename ofconsole to console.
* grub-core/commands/terminal.c (handle_command): Handle ofconsole
as sysnonym to console.
* grub-core/term/ieee1275/ofconsole.c: Renamed to ..
* grub-core/term/ieee1275/console.c: ... this. All users updated.
Rename grub_ofconsole_ to grub_console_. All users updated
(grub_console_term_output): Rename "ofconsole" to "console".
* grub-core/term/terminfo.c (grub_cmd_terminfo): Handle "ofconsole"
as "console".
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 15:34:39 +0000 (16:34 +0100)]
* grub-core/loader/i386/pc/plan9.c (grub_cmd_plan9): Remove PXE
handling.
* include/grub/disk.h (grub_disk_dev_id): Remove obsolete
GRUB_DISK_DEVICE_UUID_ID, GRUB_DISK_DEVICE_PXE_ID and
GRUB_DISK_DEVICE_FILE_ID.
Vladimir 'phcoder' Serbinenko [Sun, 29 Jan 2012 15:24:07 +0000 (16:24 +0100)]
* grub-core/kern/partition.c (grub_partition_get_name): Simplify logic
and improve performance.