Commit graph

6390 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
e4b7f404d8 * grub-core/kern/corecmd.c (grub_core_cmd_ls): Handle error in parsing
device name.
2012-02-12 19:00:50 +01:00
Vladimir 'phcoder' Serbinenko
e7b02f9ec0 * grub-core/fs/ntfs.c (locate_attr): Avoid set in if.
(grub_ntfs_iterate_dir): Likewise.
2012-02-12 18:47:46 +01:00
Vladimir 'phcoder' Serbinenko
0331e102c9 Efiemu stylistic fixes and gettext.
* grub-core/efiemu/i386/loadcore32.c
	(grub_arch_efiemu_relocate_symbols32): Avoid set in if.
	* grub-core/efiemu/i386/loadcore64.c
	(grub_arch_efiemu_relocate_symbols64): Likewise.
	* grub-core/efiemu/i386/pc/cfgtables.c
	(grub_machine_efiemu_init_tables): Likewise.
	* grub-core/efiemu/loadcore.c (grub_efiemu_resolve_symbols): Likewise.
	(grub_efiemu_loadcore_initXX): Add a filename argument.
	All users updated.
	Improved error message.
	* grub-core/efiemu/loadcore_common.c (grub_efiemu_loadcore_init):
	Add a filename argument.
	All users updated.
	* grub-core/efiemu/symbols.c (grub_efiemu_set_virtual_address_map):
	Reclassify double relocation as GRUB_ERR_BUG.
2012-02-12 18:43:39 +01:00
Vladimir 'phcoder' Serbinenko
306fc0741f * grub-core/commands/i386/pc/play.c (grub_cmd_play): Improve error
handling.
2012-02-12 17:38:13 +01:00
Vladimir 'phcoder' Serbinenko
794d8ef2af * grub-core/commands/hdparm.c (grub_cmd_hdparm): Allow running
on partition.
2012-02-12 17:36:33 +01:00
Vladimir 'phcoder' Serbinenko
f991dd3c32 * include/grub/misc.h (grub_error_save): Fix cleaning grub_errno. 2012-02-12 17:21:09 +01:00
Vladimir 'phcoder' Serbinenko
d61386e21d Improve string. Gettextize. 2012-02-12 15:25:25 +01:00
Vladimir 'phcoder' Serbinenko
78dde88e8c * configure.ac: Remove -Winline altogether and -Wmissing-prototypes on
utils.
	* util/import_gcry.py: Add -Wno-strict-aliasing on checked modules.
2012-02-11 12:21:21 +01:00
Vladimir 'phcoder' Serbinenko
4786a90fee * grub-core/disk/diskfilter.c (grub_diskfilter_print_partmap)
[GRUB_UTIL]: New function.
	(insert_array) [GRUB_UTIL]: Store partmaps.
	* include/grub/diskfilter.h (grub_diskfilter_pv) [GRUB_UTIL]: New member
	partmaps.
	(grub_diskfilter_print_partmap) [GRUB_UTIL]: New proto.
	* util/grub-probe.c (probe_partmap): Call grub_diskfilter_print_partmap.
	(probe_abstraction): Print diskfilter and not raid.
	Reported by: Lennart Sorensen
2012-02-11 11:57:47 +01:00
Vladimir 'phcoder' Serbinenko
0b6225bd27 * util/grub-mkimage.c (generate_image): Explicitly init decompress_size.
* util/grub-mkimagexx.c (MASK3): New define.
	(add_value_to_slot_20b): Use MASK3.
	(add_value_to_slot_21): Likewise.
	(relocate_addresses): Fix format specification.
	(load_image): Explicitly init symtab_section.
2012-02-11 11:50:10 +01:00
Vladimir 'phcoder' Serbinenko
b055f8f676 * util/getroot.c (grub_find_root_devices_from_mountinfo): Fix types.
(grub_util_biosdisk_get_grub_dev): Fix format specification.
2012-02-11 11:41:22 +01:00
Vladimir 'phcoder' Serbinenko
b77c2fb725 * grub-core/kern/emu/full.c (grub_arch_dl_get_tramp_got_size): Enable
on powerpc.
	Reported by: Lennart Sorensen
2012-02-11 11:35:54 +01:00
Vladimir 'phcoder' Serbinenko
e3ec28abcf * gentpl.py: Add missing license header.
* docs/grub.texi: Update copyright year.
2012-02-11 11:31:13 +01:00
Grégoire Sutre
c8d9ead677 Source grub-mkconfig_lib from the build directory at build time. 2012-02-10 18:16:27 +01:00
Vladimir 'phcoder' Serbinenko
ebcecdf1c3 Increase warning level.
* conf/Makefile.common (CFLAGS_GNULIB): Add -Wno-redundant-decls
	-Wno-unreachable-code -Wno-conversion -Wno-old-style-definition.
	* configure.ac (HOST_CFLAGS): Add bunch of -W arguments.
	(TARGET_CFLAGS): Likewise.
	(HOST_CFLAGS): Add -Werror unless --disable-werror is activated.
	* grub-core/Makefile.core.def (decompressor_xz): Add
	-Wno-unreachable-code.
	(normal): Add -Wno-redundant-decls.
	(xzio): Add -Wno-unreachable-code.
	(lzopio): Add -Wno-redundant-decls -Wno-error.
	* grub-core/commands/acpi.c: Add exception to -Wcast-align.
	* grub-core/commands/lsacpi.c: Add exception to -Wcast-align.
	* grub-core/gensymlist.sh: Add exception to -Wmissing-format-attribute.
	* grub-core/kern/dl.c: Add exception to -Wcast-align.
	* grub-core/kern/efi/efi.c (grub_efi_modules_addr): Likewise.
	* grub-core/kern/i386/coreboot/init.c: Add exception to
	-Wsuggest-attribute=noreturn.
	* grub-core/kern/ia64/dl.c: Add exception to -Wcast-align.
	* grub-core/kern/ia64/dl_helper.c: Likewise.
	* grub-core/kern/mips/dl.c: Likewise.
	* grub-core/kern/sparc64/dl.c: Likewise.
	* grub-core/lib/LzmaEnc.c: Add exception to -Wshadow.
	* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (memcpy): Likewise.
	(memcmp): Likewise.
	* grub-core/lib/pbkdf2.c: Add exception to -Wunreachable-code.
	* grub-core/loader/ia64/efi/linux.c: Add exception to -Wcast-align.
	* grub-core/loader/mips/linux.c: Likewise.
	* grub-core/loader/multiboot_elfxx.c: Likewise.
	* grub-core/script/parser.y: Add exception to -Wunreachable-code.
	* grub-core/video/sm712.c: Add exception to -Wcast-align.
	* util/import_gcry.py: Add -Wno-cast-align to modules checked by hand.
	* grub-core/font/font.c (grub_font_loader_init): Add explicit cast and
	fixme.
	* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
	* grub-core/kern/i386/multiboot_mmap.c (grub_machine_mmap_init):
	Fix prototype.
2012-02-10 16:48:48 +01:00
Vladimir 'phcoder' Serbinenko
37bb97fe9a * grub-core/lib/i386/relocator16.S: Fix incorrect use of absolute
address.
2012-02-10 14:47:06 +01:00
Vladimir 'phcoder' Serbinenko
29a3550b61 * grub-core/commands/legacycfg.c (grub_cmd_legacy_kernel):
Avoid improper use of strings.
	(grub_cmd_legacy_initrdnounzip): Likewise.
2012-02-10 14:30:19 +01:00
Vladimir 'phcoder' Serbinenko
dfdffd0d94 * include/grub/emu/misc.h (grub_util_warn): Add missing format
attribute.
	(grub_util_info): Likewise.
	(grub_util_error): Likewise.
2012-02-10 14:15:14 +01:00
Vladimir 'phcoder' Serbinenko
102fae4a1c * util/grub-mount.c (fuse_init): Avoid improper use of strings.
* util/grub-fstest.c (fstest): Likewise.
2012-02-10 14:12:43 +01:00
Vladimir 'phcoder' Serbinenko
7e94d044ad * 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.
2012-02-10 14:01:53 +01:00
Vladimir 'phcoder' Serbinenko
5ebd976935 * util/import_gcry.py: Include grub/crypto.h in init.c. 2012-02-10 13:58:53 +01:00
Vladimir 'phcoder' Serbinenko
495fc8c181 * 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.
2012-02-10 13:56:18 +01:00
Vladimir 'phcoder' Serbinenko
043c2ea33b * 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
2012-02-10 13:49:24 +01:00
Vladimir 'phcoder' Serbinenko
3ec65a8187 * util/grub-mkrelpath.c (argp_parser): Remove unused variable. 2012-02-10 13:47:04 +01:00
Vladimir 'phcoder' Serbinenko
a4d9fe4a95 * util/grub-mkpasswd-pbkdf2.c (argp_parser): Remove unused variable.
(main): Likewise. Use xmalloc. Respect format security.
2012-02-10 13:44:57 +01:00
Vladimir 'phcoder' Serbinenko
15b81d49bc * util/grub-mklayout.c (console_grub_equivalence): Make "layout"
a const char *.
	(argp_parser): Remove unused variable.
2012-02-10 13:42:00 +01:00
Vladimir 'phcoder' Serbinenko
31731fc04f * 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.
2012-02-10 13:31:43 +01:00
Vladimir 'phcoder' Serbinenko
0809527b9d * 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.
2012-02-10 13:26:19 +01:00
Vladimir 'phcoder' Serbinenko
45b0c8b797 * 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.
2012-02-10 13:17:12 +01:00
Vladimir 'phcoder' Serbinenko
1b024b4ea0 * 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 *.
2012-02-10 13:08:59 +01:00
Vladimir 'phcoder' Serbinenko
5d1d4e288f * 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.
2012-02-10 13:03:21 +01:00
Vladimir 'phcoder' Serbinenko
36eb7379b3 * util/grub-probe.c (probe): Don't call gettext on already translated
grub_errmsg.
	Remove unused variables.
	(argp_parser): Remove unused variable.
2012-02-10 12:57:00 +01:00
Vladimir 'phcoder' Serbinenko
76fb2ea93b * util/grub-script-check.c (argp_parser): Remove unused variable.
(main): Rename read to curread to avoid shadowing.
2012-02-10 12:54:40 +01:00
Vladimir 'phcoder' Serbinenko
56c98584c7 * 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.
2012-02-10 12:52:46 +01:00
Vladimir 'phcoder' Serbinenko
164ebb480d * include/grub/symbol.h (EXT_C) [GRUB_UTIL]: Removed.
(FUNCTION) [GRUB_UTIL]: Likewise.
	(VARIABLE) [GRUB_UTIL]: Likewise.
2012-02-10 12:47:42 +01:00
Vladimir 'phcoder' Serbinenko
44318d6168 * include/grub/misc.h: Avoid evaluationg NEED_ENABLE_EXECUTE_STACK and
NEED_REGISTER_FRAME_INFO in GRUB_UTIL.
2012-02-10 12:45:32 +01:00
Vladimir 'phcoder' Serbinenko
31a2600267 * grub-core/partmap/bsdlabel.c (iterate_real): Fix freeing of static
buffer.
2012-02-10 12:43:11 +01:00
Vladimir 'phcoder' Serbinenko
a655c182c5 * grub-core/disk/ldm.c (grub_util_get_ldm): Remove unused variables.
(grub_util_ldm_embed): Likewise.
2012-02-10 12:40:22 +01:00
Vladimir 'phcoder' Serbinenko
6fa679671e * grub-core/disk/ldm.c (grub_util_get_ldm): Remove unused variables.
(grub_util_ldm_embed): Likewise.
2012-02-10 12:36:02 +01:00
Vladimir 'phcoder' Serbinenko
9a7428e638 * 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 *.
2012-02-10 12:28:34 +01:00
Vladimir 'phcoder' Serbinenko
4f96abd198 * grub-core/script/lexer.c (grub_script_lexer_init): Rename getline
to arg_getline to avoid shadowing.
2012-02-10 12:25:27 +01:00
Vladimir 'phcoder' Serbinenko
44d10dada6 * grub-core/partmap/gpt.c (gpt_partition_map_embed): Rename disk to
disk_ to avoid shadowing.
2012-02-10 12:24:03 +01:00
Vladimir 'phcoder' Serbinenko
340ba63ede * grub-core/lib/LzFind.c (MatchFinder_GetIndexByte): Rename index to
curindex to avoid shadowing.
	Make static.
	(MatchFinder_GetNumAvailableBytes): Make static.
2012-02-10 12:21:28 +01:00
Vladimir 'phcoder' Serbinenko
22965bce9b * grub-core/fs/squash4.c (direct_read): Rename read to curread to
avoid shadowing.
2012-02-10 12:17:40 +01:00
Vladimir 'phcoder' Serbinenko
7b5784d4d3 * grub-core/disk/cryptodisk.c (grub_cryptodisk_endecrypt): Rename
argument from encrypt to do_encrypt to avoid shadowing.
2012-02-10 12:11:50 +01:00
Vladimir 'phcoder' Serbinenko
6f48ca0143 * grub-core/loader/multiboot_elfxx.c (grub_multiboot_load_elf): Fix
incorrect nesting of #if's.
2012-02-09 23:53:27 +01:00
Vladimir 'phcoder' Serbinenko
a4ea2dff4b * 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.
2012-02-09 23:48:34 +01:00
Vladimir 'phcoder' Serbinenko
def9fc1bb2 * grub-core/disk/diskfilter.c (read_segment): Renome unreachable code.
* grub-core/net/ip.c (grub_net_recv_ip4_packets): Likewise.
2012-02-09 23:43:43 +01:00
Vladimir 'phcoder' Serbinenko
a67b2a046c * 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.
2012-02-09 23:40:17 +01:00
Vladimir 'phcoder' Serbinenko
44c6828db4 * grub-core/loader/i386/xnu.c (grub_xnu_boot): Fix printf.
* grub-core/loader/ia64/efi/linux.c (grub_cmd_fpswa): Likewise.
2012-02-09 23:32:03 +01:00