]> git.proxmox.com Git - grub2.git/log
grub2.git
12 years ago * util/grub-mount.c (fuse_init): Avoid improper use of strings.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 13:12:43 +0000 (14:12 +0100)]
* util/grub-mount.c (fuse_init): Avoid improper use of strings.
* util/grub-fstest.c (fstest): Likewise.

12 years ago * grub-core/disk/geli.c (grub_md_sha256_real): Respect format security.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 13:01:53 +0000 (14:01 +0100)]
* grub-core/disk/geli.c (grub_md_sha256_real): Respect format security.
(grub_md_sha512_real): Likewise.
(grub_util_get_geli_uuid): Likewise.
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): Likewise.
(grub_util_biosdisk_open): Fix format specification.
Respect format security.
* grub-core/kern/emu/misc.c (xmalloc): Respect format security.
(xrealloc): Likewise.
(xasprintf): Likewise.

12 years ago * util/import_gcry.py: Include grub/crypto.h in init.c.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 12:58:53 +0000 (13:58 +0100)]
* util/import_gcry.py: Include grub/crypto.h in init.c.

12 years ago * util/grub-mkimage.c (compress_kernel_lzma): Respect format security.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 12:56:18 +0000 (13:56 +0100)]
* util/grub-mkimage.c (compress_kernel_lzma): Respect format security.
(generate_image): Make prefix a const char *.
Fix format specifications. Respect format security.
Avoid void * arithmetics.
Avoid shadowing.
(argp_parser): Remove unused variable. Respect format security.
* util/grub-mkimagexx.c (relocate_symbols): Avoid shadowing.
(count_funcs) [!MKIMAGE_ELF64]: #if-out.
(count_funcs): Remove unused variable.
(relocate_addresses): Fix format specification.
Disable x86-64 with elf32. Remove unused variables.
(add_fixup_entry): Avoid shadowing.
(make_reloc_section): Fix format specification.
Use assert.
(locate_sections): Fix format specifications.
(load_image): Avoid shadowing.

12 years ago * util/grub-setup.c (setup): Remove unused variable. Avoid shadowing.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 12:49:24 +0000 (13:49 +0100)]
* util/grub-setup.c (setup): Remove unused variable. Avoid shadowing.
Fix format specifications. Respect format security.
Don't translate already translated grub_errmsg.
(argp_parser): Remove unused variable

12 years ago * util/grub-mkrelpath.c (argp_parser): Remove unused variable.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 12:47:04 +0000 (13:47 +0100)]
* util/grub-mkrelpath.c (argp_parser): Remove unused variable.

12 years ago * util/grub-mkpasswd-pbkdf2.c (argp_parser): Remove unused variable.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 12:44:57 +0000 (13:44 +0100)]
* util/grub-mkpasswd-pbkdf2.c (argp_parser): Remove unused variable.
(main): Likewise. Use xmalloc. Respect format security.

12 years ago * util/grub-mklayout.c (console_grub_equivalence): Make "layout"
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 12:42:00 +0000 (13:42 +0100)]
* util/grub-mklayout.c (console_grub_equivalence): Make "layout"
a const char *.
(argp_parser): Remove unused variable.

12 years ago * util/grub-mkfont.c (grub_font_info): Make name a const char *.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 12:31:43 +0000 (13:31 +0100)]
* util/grub-mkfont.c (grub_font_info): Make name a const char *.
(add_pixel): Make static.
(add_font): Likewise.
(write_string_section): Make name and str a const char *.
(write_be16_section): Make name a const char *.
(print_glyphs): Make static.
(write_font_ascii_bitmap): Likewise.
(write_font_width_spec): Likewise.
(write_font_pf2): Likewise.
(argp_parser): Remove unused variable.
Respect format security.
(main): Avoid shadowing. Respect format security.

12 years ago * util/grub-editenv.c (argp_parser): Make static.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 12:26:19 +0000 (13:26 +0100)]
* util/grub-editenv.c (argp_parser): Make static.
(create_envblk_file): Use xmalloc.
(open_envblk_file): Likewise.
Resepect format security.
(set_variables): Respect format security.

12 years ago * util/getroot.c (grub_find_device): Respect format security.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 12:17:12 +0000 (13:17 +0100)]
* util/getroot.c (grub_find_device): Respect format security.
(get_mdadm_uuid): Remove unused variable.
(grub_util_pull_device): Dont call gettext on already translated
grub_errmsg.
(find_system_device): Remove unused variable.
(grub_util_get_grub_dev): Likewise.
(grub_make_system_path_relative_to_its_root): Respect format security.

12 years ago * util/grub-fstest.c (execute_command): Make first argument
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 12:08:59 +0000 (13:08 +0100)]
* util/grub-fstest.c (execute_command): Make first argument
a const char *.
(read_file): Avoid shadowing.
Reuse underlying error message if device open fails.
(cmd_cmp): Respect format security.
(root): Make const char *.
(fstest): Remove args argument and use global copy.
Respect format security.
(argp_parser): Make static.
(main): Make default_root const char *.

12 years ago * util/grub-mount.c (root): Make const char *.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 12:03:21 +0000 (13:03 +0100)]
* util/grub-mount.c (root): Make const char *.
(execute_command): Make first argument a const char *.
(fuse_init): Respect format security.
(argp_parser): Make static. Remove unused variable.
(main):  Make default_root a const char *.
Respect format security.

12 years ago * util/grub-probe.c (probe): Don't call gettext on already translated
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 11:57:00 +0000 (12:57 +0100)]
* util/grub-probe.c (probe): Don't call gettext on already translated
grub_errmsg.
Remove unused variables.
(argp_parser): Remove unused variable.

12 years ago * util/grub-script-check.c (argp_parser): Remove unused variable.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 11:54:40 +0000 (12:54 +0100)]
* util/grub-script-check.c (argp_parser): Remove unused variable.
(main): Rename read to curread to avoid shadowing.

12 years ago * util/misc.c (grub_util_write_image_at): Fix format specification.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 11:52:46 +0000 (12:52 +0100)]
* util/misc.c (grub_util_write_image_at): Fix format specification.
(grub_util_write_image): Likewise.
(grub_script_execute_argument_to_string): Removed (unused).
(grub_script_execute_menuentry): Likewise.
(grub_putchar): Likewise.

12 years ago * include/grub/symbol.h (EXT_C) [GRUB_UTIL]: Removed.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 11:47:42 +0000 (12:47 +0100)]
* include/grub/symbol.h (EXT_C) [GRUB_UTIL]: Removed.
(FUNCTION) [GRUB_UTIL]: Likewise.
(VARIABLE) [GRUB_UTIL]: Likewise.

12 years ago * include/grub/misc.h: Avoid evaluationg NEED_ENABLE_EXECUTE_STACK and
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 11:45:32 +0000 (12:45 +0100)]
* include/grub/misc.h: Avoid evaluationg NEED_ENABLE_EXECUTE_STACK and
NEED_REGISTER_FRAME_INFO in GRUB_UTIL.

12 years ago * grub-core/partmap/bsdlabel.c (iterate_real): Fix freeing of static
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 11:43:11 +0000 (12:43 +0100)]
* grub-core/partmap/bsdlabel.c (iterate_real): Fix freeing of static
buffer.

12 years ago * grub-core/disk/ldm.c (grub_util_get_ldm): Remove unused variables.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 11:40:22 +0000 (12:40 +0100)]
* grub-core/disk/ldm.c (grub_util_get_ldm): Remove unused variables.
(grub_util_ldm_embed): Likewise.

12 years ago * grub-core/disk/ldm.c (grub_util_get_ldm): Remove unused variables.
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 11:36:02 +0000 (12:36 +0100)]
* grub-core/disk/ldm.c (grub_util_get_ldm): Remove unused variables.
(grub_util_ldm_embed): Likewise.

12 years ago * util/grub-editenv.c (print_var): Rename name to varname to
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 11:28:34 +0000 (12:28 +0100)]
* util/grub-editenv.c (print_var): Rename name to varname to
avoid shadowing.
(main): Rename index to curindex to avoid shadowing.
MAke filename a const char *.

12 years ago * grub-core/script/lexer.c (grub_script_lexer_init): Rename getline
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 11:25:27 +0000 (12:25 +0100)]
* grub-core/script/lexer.c (grub_script_lexer_init): Rename getline
to arg_getline to avoid shadowing.

12 years ago * grub-core/partmap/gpt.c (gpt_partition_map_embed): Rename disk to
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 11:24:03 +0000 (12:24 +0100)]
* grub-core/partmap/gpt.c (gpt_partition_map_embed): Rename disk to
disk_ to avoid shadowing.

12 years ago * grub-core/lib/LzFind.c (MatchFinder_GetIndexByte): Rename index to
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 11:21:28 +0000 (12:21 +0100)]
* grub-core/lib/LzFind.c (MatchFinder_GetIndexByte): Rename index to
curindex to avoid shadowing.
Make static.
(MatchFinder_GetNumAvailableBytes): Make static.

12 years ago * grub-core/fs/squash4.c (direct_read): Rename read to curread to
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 11:17:40 +0000 (12:17 +0100)]
* grub-core/fs/squash4.c (direct_read): Rename read to curread to
avoid shadowing.

12 years ago * grub-core/disk/cryptodisk.c (grub_cryptodisk_endecrypt): Rename
Vladimir 'phcoder' Serbinenko [Fri, 10 Feb 2012 11:11:50 +0000 (12:11 +0100)]
* grub-core/disk/cryptodisk.c (grub_cryptodisk_endecrypt): Rename
argument from encrypt to do_encrypt to avoid shadowing.

12 years ago * grub-core/loader/multiboot_elfxx.c (grub_multiboot_load_elf): Fix
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 22:53:27 +0000 (23:53 +0100)]
* grub-core/loader/multiboot_elfxx.c (grub_multiboot_load_elf): Fix
incorrect nesting of #if's.

12 years ago * grub-core/commands/lsacpi.c (disp_acpi_xsdt_table): #if'-out the
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.

12 years ago * grub-core/disk/diskfilter.c (read_segment): Renome unreachable code.
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.

12 years ago * grub-core/gnulib/regex.h (re_pattern_buffer): Declare buffer as
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.

12 years ago * grub-core/loader/i386/xnu.c (grub_xnu_boot): Fix printf.
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.

12 years ago * grub-core/kern/i386/qemu/mmap.c (grub_machine_mmap_init):
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.

12 years ago * grub-core/bus/usb/ehci.c (grub_ehci_ehcc_read32): Restructure to
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.

12 years ago * grub-core/kern/emu/full.c (grub_emu_post_init): Remove raid reinit.
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.

12 years ago * grub-core/kern/emu/hostfs.c (grub_hostfs_close):
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.

12 years ago * grub-core/efiemu/loadcore_common.c (grub_efiemu_loadcore_load):
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.

12 years ago * include/grub/net.h: Remove double declarations.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 21:44:28 +0000 (22:44 +0100)]
* include/grub/net.h: Remove double declarations.

12 years ago Remove "payload" command in ia64 Linux loader since I couldn't
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".

12 years ago Convert UHCI to DMA framework.
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.

12 years ago * grub-core/video/colors.c (grub_video_parse_color): Fix error message.
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.

12 years ago * util/grub-mkstandalone.in: Fix modules directory.
Vladimir 'phcoder' Serbinenko [Thu, 9 Feb 2012 13:45:56 +0000 (14:45 +0100)]
* util/grub-mkstandalone.in: Fix modules directory.

12 years ago * util/grub-mkimage.c (image_targets): Set default_compression to lzma
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.

12 years ago Fix `help' with unloaded modules.
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.

12 years ago * grub-core/fs/cpio.c (grub_cpio_dir): Fix a bug with multiple listing.
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.

12 years ago * grub-core/lib/posix_wrap/wchar.h (mbrtowc): Set pwc to zero to avoid
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.

12 years ago * util/grub-mknetdir.in: Use . rather than source for POSIX
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.

12 years ago * util/grub-probe.c (main): Fix trailing space in compatibility hint.
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.

12 years ago * grub-core/kern/partition.c (grub_partition_get_name): Fix uninited
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.

12 years ago * grub-core/commands/hdparm.c (grub_cmd_hdparm): Accept device name
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.

12 years ago * grub-core/net/net.c (GRUB_MOD_INIT): Don't register netfs.
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.

12 years ago * grub-core/kern/partition.c (grub_partition_get_name): Fix reverse
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.

12 years ago Improve gettext support. Stylistic fixes and error handling fixes while
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.

12 years ago * grub-core/lib/i386/relocator16.S: Revert moving A20 code into PM
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.

12 years ago * grub-core/commands/minicmd.c (GRUB_MOD_INIT): Add missing SIZE
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.

12 years ago Clarify and unify messages.
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.

12 years ago Improve and unify messages.
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.

12 years ago * grub-core/Makefile.core.def (pxechain): New module.
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.

12 years ago * grub-core/kern/err.c (GRUB_MAX_ERRMSG): Move to ...
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.

12 years ago * grub-core/lib/i386/relocator16.S (grub_relocator16_start): Move switch
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.

12 years ago * grub-core/disk/diskfilter.c (grub_diskfilter_make_raid): Return
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.

12 years ago Move platform-dependent files from $prefix to $prefix/$platform.
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.

12 years ago * grub-core/kern/ieee1275/openfw.c (grub_claimmap): Change to
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.

12 years ago * grub-core/gettext/gettext.c: Mostly rewritten to avoid using
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.

12 years ago * grub-core/script/execute.c (grub_script_return): Fix warning.
Vladimir 'phcoder' Serbinenko [Sat, 4 Feb 2012 11:21:21 +0000 (12:21 +0100)]
* grub-core/script/execute.c (grub_script_return): Fix warning.

12 years ago * grub-core/script/execute.c (grub_script_return): Fix potential
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.

12 years ago * po/POTFILES.in: Regenerate.
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.

12 years ago * Makefile.util.def (grub-mkdevicemap): Removed.
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.

12 years ago * util/grub-mkfont.c: Migrate to argp.
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.

12 years ago * util/grub-reboot.in: Add missing datarootdir.
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.

12 years ago * util/grub.d/30_os-prober.in: Fix TRANSLATORS comment.
Vladimir 'phcoder' Serbinenko [Fri, 3 Feb 2012 20:25:10 +0000 (21:25 +0100)]
* util/grub.d/30_os-prober.in: Fix TRANSLATORS comment.

12 years ago * util/grub-kbdcomp.in: Add decent help and gettextize.
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.

12 years ago Migrate grub-mkimage.c to argp.
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.

12 years ago * util/grub-mkrescue.in: Use same message as
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.

12 years ago * util/powerpc/ieee1275/grub-mkrescue.in: Gettextize. Unify the command
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.

12 years ago * grub-core/kern/mm.c: Add missing include of i18n.h
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.

12 years ago * grub-core/loader/ia64/efi/linux.c (find_mmap_size): Replace fatal with
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.

12 years ago * grub-core/loader/i386/xnu.c (grub_cmd_devprop_load): Fix error
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.

12 years agoNetBSD disk wedge support.
Grégoire Sutre [Fri, 3 Feb 2012 11:32:21 +0000 (12:32 +0100)]
NetBSD disk wedge support.

12 years ago * util/grub-mkconfig.in: Use umask rather than chmod to create
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.

12 years ago * grub-core/commands/ls.c: Gettextize.
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.

12 years ago * grub-core/fs/reiserfs.c (grub_reiserfs_get_item): Use proper error
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.

12 years ago * grub-core/disk/ldm.c (grub_util_ldm_embed): Correct error message.
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.

12 years ago * grub-core/commands/search_file.c (SEARCH_TARGET): Remove obsolete
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.

12 years ago * util/grub-mkstandalone.in: Fix help messages. Gettextize.
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.

12 years ago * util/grub-mkimage.c (main): Fix format-security warning.
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.

12 years ago * util/grub-probe.c (probe): Don't crash on canonicalize_file_name
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.

12 years ago * util/getroot.c (find_root_devices_from_libzfs): Fix compilation error.
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.

12 years ago Support install on multi-device filesystems.
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.

12 years ago * grub-core/fs/zfs/zfscrypt.c: Add link to documentation.
Vladimir 'phcoder' Serbinenko [Wed, 1 Feb 2012 17:30:51 +0000 (18:30 +0100)]
* grub-core/fs/zfs/zfscrypt.c: Add link to documentation.

12 years ago * grub-core/commands/videotest.c (grub_cmd_videotest): Fix subset
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>.

12 years ago Fix ehci on amd64.
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.

12 years ago * grub-core/normal/context.c (grub_env_extractor_close): Don't crash
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.

12 years ago CBI support.
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.

12 years agomerge mainline into cbi
Vladimir 'phcoder' Serbinenko [Wed, 1 Feb 2012 13:30:40 +0000 (14:30 +0100)]
merge mainline into cbi

12 years ago EHCI support. All of the credit goes to Aleš Nesrsta. I've just added
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.

12 years agoFix type errors. Don't stop after first EHCI controller is found.
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.

12 years agomerge mainline into ehci
Vladimir 'phcoder' Serbinenko [Wed, 1 Feb 2012 12:19:42 +0000 (13:19 +0100)]
merge mainline into ehci

12 years ago * grub-core/fs/fat.c (grub_fat_mount) [!MODE_EXFAT]: Remove fstype
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.

12 years ago * docs/grub.texi (Unicode): Mention identifier and space limitations.
Vladimir 'phcoder' Serbinenko [Tue, 31 Jan 2012 21:59:32 +0000 (22:59 +0100)]
* docs/grub.texi (Unicode): Mention identifier and space limitations.