1. 16 Mar, 2018 1 commit
  2. 16 Feb, 2018 1 commit
  3. 12 Feb, 2017 1 commit
  4. 12 Feb, 2016 1 commit
    • Vladimir Serbinenko's avatar
      yylex: use grub_fatal for exit. · 342d6edb
      Vladimir Serbinenko authored
      lexer calls yylex_fatal on fatal internal errors. yylex_fatal itself is
      declared as noreturn and calls exit. Returning from noreturn function has
      unpredictable consequences.
      342d6edb
  5. 20 Jan, 2016 2 commits
  6. 12 Jan, 2016 1 commit
  7. 28 Jan, 2015 1 commit
  8. 21 Jan, 2015 1 commit
  9. 16 Nov, 2013 1 commit
    • Vladimir Serbinenko's avatar
      Decrease stack usage in lexer. · 080603f0
      Vladimir Serbinenko authored
      	We have only 92K of stack and using over 4K per frame is wasteful
      
      	* grub-core/script/yylex.l (yyalloc), (yyfree), (yyrealloc): Declare
      	as macros so that compiler would remove useless structure on stack.
      	Better solution would be to fix flex not to put this structure on
      	the stack but flex is external program.
      080603f0
  10. 07 Nov, 2013 1 commit
    • Vladimir Serbinenko's avatar
      Remove vestiges of -Wunsafe-loop-optimisations. · ec0ebb3f
      Vladimir Serbinenko authored
      	* conf/Makefile.common (CFLAGS_GNULIB): Remove
      	-Wno-unsafe-loop-optimisations.
      	* grub-core/commands/legacycfg.c: Remove -Wunsafe-loop-optimisations
      	pragma.
      	* grub-core/io/gzio.c: Likewise.
      	* grub-core/script/parser.y: Likewise.
      	* grub-core/script/yylex.l: Likewise.
      	* util/grub-mkfont.c: Likewise.
      ec0ebb3f
  11. 16 Oct, 2013 1 commit
  12. 07 Jun, 2013 1 commit
  13. 29 Apr, 2013 1 commit
  14. 03 Mar, 2013 1 commit
  15. 02 Mar, 2013 1 commit
  16. 16 Jan, 2013 1 commit
  17. 15 Jan, 2013 1 commit
    • Colin Watson's avatar
      Remove nested functions from script reading and parsing. · 09fd6d82
      Colin Watson authored
      * 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.
      09fd6d82
  18. 05 Sep, 2012 1 commit
  19. 21 Jun, 2012 1 commit
  20. 19 Jun, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Fix wildcard regexp dot and other special characters handling. · 48556879
      Vladimir 'phcoder' Serbinenko authored
      	Reported by: Robert Mabee.
      
      	* grub-core/commands/wildcard.c (isregexop): Add "|+{}[]?".
      	(make_regex): Escape "|+{}[]". Transform '?' to '.?'.
      	(split_path): Trigger expansion on '?'.
      	(unescape): New function.
      	(wildcard_expand): Unescape parts copied without globbing.
      	* grub-core/script/execute.c (wildcard_escape): Escape '?'.
      	(grub_script_arglist_to_argv): Don't unescape expansions.
      48556879
  21. 08 Jun, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Fix wildcard escaping. · 5e619f40
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/commands/wildcard.c (wildcard_escape): Moved from here ...
      	* grub-core/script/execute.c (wildcard_escape): .. to here.
      	Don't escape dot.
      	* grub-core/commands/wildcard.c (wildcard_unescape): Moved from here ...
      	* grub-core/script/execute.c (wildcard_unescape): .. to here.
      	Don't escape dot.
      	* grub-core/script/execute.c (gettext_append): Always escape.
      	(grub_script_arglist_to_argv): Always handle escaping/unescaping.
      	* grub-core/script/yylex.l: Don't cut away the escaping.
      	* tests/grub_script_echo1.in: Add tests with wildcard.
      5e619f40
  22. 08 May, 2012 1 commit
  23. 19 Mar, 2012 1 commit
  24. 11 Mar, 2012 2 commits
  25. 10 Mar, 2012 1 commit
  26. 05 Mar, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      * grub-core/net/http.c: Add TRANSLATORS comments. · ef292a87
      Vladimir 'phcoder' Serbinenko authored
      	* grub-core/normal/cmdline.c: Likewise.
      	* grub-core/normal/misc.c: Likewise.
      	* grub-core/partmap/msdos.c: Likewise.
      	* grub-core/parttool/msdospart.c: Likewise.
      	* grub-core/script/execute.c: Likewise.
      	* grub-core/script/main.c: Likewise.
      	* grub-core/term/terminfo.c: Likewise.
      	* grub-core/video/bitmap.c: Likewise.
      	* util/grub-install.in: Likewise.
      	* util/grub-mkimage.c: Likewise.
      	* util/grub-mklayout.c: Likewise.
      	* util/grub-setup.c: Likewise.
      ef292a87
  27. 04 Mar, 2012 1 commit
  28. 26 Feb, 2012 2 commits
  29. 24 Feb, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      * conf/Makefile.common (CFLAGS_GNULIB): Add · 4e27343f
      Vladimir 'phcoder' Serbinenko authored
      	-Wno-unsafe-loop-optimizations.
      	* configure.ac: Remove -Wmissing-declarations and -Wmissing-prototypes
      	on tools.
      	* grub-core/commands/legacycfg.c: Add pragma to skip
      	-Wunsafe-loop-optimizations.
      	(check_password_md5_real): Fix loop counter type.
      	* grub-core/commands/testload.c (grub_cmd_testload): Fix over the EOF
      	reading.
      	* grub-core/disk/ldm.c (grub_util_get_ldm): Fix logic error.
      	* grub-core/fs/zfs/zfs_sha256.c (zio_checksum_SHA256): Add safety
      	loop condition.
      	* grub-core/io/gzio.c: Add pragma to skip -Wunsafe-loop-optimizations.
      	* grub-core/lib/LzmaEnc.c (GetOptimum): Avoid possible infinite loop.
      	* grub-core/net/net.c (grub_net_route_address): Add safety loop
      	condition.
      	* grub-core/normal/charset.c (bidi_line_wrap): Likewise.
      	* grub-core/normal/cmdline.c (grub_set_history): Fix loop types and
      	avoid possible infinite loops.
      	* grub-core/script/parser.y: Add pragma to skip -Wmissing-declarations
      	and -Wunsafe-loop-optimizations.
      	* grub-core/script/yylex.l: Likewise.
      	* util/grub-mkfont.c: Add pragma to skip -Wunsafe-loop-optimizations.
      	(print_glyphs): Avoid infinite loops.
      	* util/grub-mkimage.c (compress_kernel_xz): Fix format security.
      4e27343f
  30. 12 Feb, 2012 2 commits
  31. 10 Feb, 2012 2 commits
    • Vladimir 'phcoder' Serbinenko's avatar
      Increase warning level. · ebcecdf1
      Vladimir 'phcoder' Serbinenko authored
      	* 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.
      ebcecdf1
    • Vladimir 'phcoder' Serbinenko's avatar
      * grub-core/script/lexer.c (grub_script_lexer_init): Rename getline · 4f96abd1
      Vladimir 'phcoder' Serbinenko authored
      	to arg_getline to avoid shadowing.
      4f96abd1
  32. 05 Feb, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Clarify and unify messages. · b525fd83
      Vladimir 'phcoder' Serbinenko authored
      	* 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.
      b525fd83
  33. 04 Feb, 2012 2 commits
  34. 03 Feb, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      * grub-core/commands/ls.c: Gettextize. · 4a9f8346
      Vladimir 'phcoder' Serbinenko authored
              * 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.
      4a9f8346