1. 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
  2. 10 Mar, 2012 1 commit
  3. 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
  4. 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
  5. 25 Aug, 2010 1 commit
  6. 06 May, 2010 1 commit
  7. 05 May, 2010 2 commits
  8. 27 Mar, 2010 1 commit
  9. 23 Nov, 2009 2 commits
    • Robert Millan's avatar
      2009-11-23 Robert Millan <rmh.grub@aybabtu.com> · f515aa62
      Robert Millan authored
              * script/sh/execute.c: Move from here ...
              * script/execute.c: ... to here.  Update all users.
              * script/sh/function.c: Move from here ...
              * script/function.c: ... to here.  Update all users.
              * script/sh/lexer.c: Move from here ...
              * script/lexer.c: ... to here.  Update all users.
              * script/sh/main.c: Move from here ...
              * script/main.c: ... to here.  Update all users.
              * script/sh/parser.y: Move from here ...
              * script/parser.y: ... to here.  Update all users.
              * script/sh/script.c: Move from here ...
              * script/script.c: ... to here.  Update all users.
      f515aa62
    • Robert Millan's avatar
      2009-11-23 Robert Millan <rmh.grub@aybabtu.com> · 4efeab03
      Robert Millan authored
              * include/grub/parser.h (grub_parser_register): Document need
              of `name' parameter.
              * normal/main.c (grub_normal_read_line): Simplify prompt string.
              * script/sh/main.c (grub_sh_parser, GRUB_MOD_INIT(sh)): Rename
              "sh" to "grub".
      4efeab03
  10. 04 May, 2009 1 commit
    • proski's avatar
      2009-05-03 Pavel Roskin <proski@gnu.org> · 4c402e73
      proski authored
      	* disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
      	suppress warnings.  It's no longer needed.
      	* disk/host.c: Likewise.
      	* disk/ata_pthru.c: Likewise.
      	* disk/loopback.c: Likewise.
      	* hook/datehook.c: Likewise.
      	* parttool/pcpart.c: Likewise.
      	* fs/i386/pc/pxe.c: Likewise.
      	* fs/ntfscomp.c: Likewise.
      	* efiemu/main.c: Likewise.
      	* mmap/mmap.c: Likewise.
      	* commands/crc.c: Likewise.
      	* commands/hexdump.c: Likewise.
      	* commands/hdparm.c: Likewise.
      	* commands/acpi.c: Likewise.
      	* commands/echo.c: Likewise.
      	* commands/minicmd.c: Likewise.
      	* commands/blocklist.c: Likewise.
      	* commands/memrw.c: Likewise.
      	* commands/loadenv.c: Likewise.
      	* commands/usbtest.c: Likewise.
      	* commands/lsmmap.c: Likewise.
      	* commands/boot.c: Likewise.
      	* commands/parttool.c: Likewise.
      	* commands/configfile.c: Likewise.
      	* commands/search.c: Likewise.
      	* commands/ieee1275/suspend.c: Likewise.
      	* commands/cat.c: Likewise.
      	* commands/i386/pc/pxecmd.c: Likewise.
      	* commands/i386/pc/play.c: Likewise.
      	* commands/i386/pc/halt.c: Likewise.
      	* commands/i386/pc/vbeinfo.c: Likewise.
      	* commands/i386/pc/vbetest.c: Likewise.
      	* commands/lspci.c: Likewise.
      	* commands/date.c: Likewise.
      	* commands/handler.c: Likewise.
      	* commands/ls.c: Likewise.
      	* commands/test.c: Likewise.
      	* commands/cmp.c: Likewise.
      	* commands/efi/loadbios.c: Likewise.
      	* commands/efi/fixvideo.c: Likewise.
      	* commands/halt.c: Likewise.
      	* commands/help.c: Likewise.
      	* commands/reboot.c: Likewise.
      	* hello/hello.c: Likewise.
      	* script/sh/main.c: Likewise.
      	* loader/xnu.c: Likewise.
      	* term/terminfo.c: Likewise.
      	* term/i386/pc/serial.c: Likewise.
      	* term/usb_keyboard.c: Likewise.
      4c402e73
  11. 03 May, 2009 1 commit
    • bean's avatar
      2009-05-02 Bean <bean123ch@gmail.com> · d558e6b5
      bean authored
      	* conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
      	script/sh/parser.y.
      	(pkglib_MODULES): Add normal.mod and sh.mod.
      	(normal_SOURCES): New variable.
      	(normal_mod_CFLAGS): Likewise.
      	(normal_mod_LDFLAGS): Likewise.
      	(sh_mod_SOURCES): Likewise.
      	(sh_mod_CFLAGS): Likewise.
      	(sh_mod_LDFLAGS): Likewise.
      
      	* conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
      	script/sh/lexer.c_DEPENDENCIES.
      	(kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
      	kern/rescue_reader.c and kern/rescue_parser.c.
      	(kernel_img_HEADERS): Remove rescue.h, add reader.h.
      	(grub_emu_SOURCES): Change source files.
      	(pkglib_MODULES): Remove normal.mod.
      	(normal_SOURCES): Removed.
      	(normal_mod_CFLAGS): Likewise.
      	(normal_mod_LDFLAGS): Likewise.
      	* conf/i386-coreboot.rmk: Likewise.
      	* conf/i386-efi.rmk: Likewise.
      	* conf/i386-ieee1276.rmk: Likewise.
      	* conf/powerpc-ieee1275.rmk: Likewise.
      	* conf/sparc64-ieee1275.rmk: Likewise.
      	* conf/x86_64-efi.rmk: Likewise.
      
      	* include/grub/command.h (grub_command_execute): New inline function.
      
      	* include/grub/menu.h (grub_menu_entry): Removed commands field.
      
      	* include/grub/normal.h: Remove <grub/setjmp.h>.
      	(grub_fs_module_list): Moved to normal/autofs.c.
      	(grub_exit_env): Removed.
      	(grub_command_execute): Likewise.
      	(grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
      	parameter script.
      	(read_command_list): New function declaration.
      	(read_fs_list): Likewise.
      
      	* include/parser.h: Include <grub/reader.h>.
      	(grub_parser_split_cmdline): Change type of getline parameter.
      	(grub_parser): New structure.
      	(grub_parser_class): New variable.
      	(grub_parser_execute): New function declaration.
      	(grub_register_rescue_parser): Likewise.
      	(grub_parser_register): New inline function.
      	(grub_parser_unregister): Likewise.
      	(grub_parser_get_current): Likewise.
      	(grub_parser_set_current): Likewise.
      
      	* include/grub/reader.h: New file.
      	* kern/reader.c: Likewise.
      	* kern/rescue_parser.c: Likewise.
      	* kern/rescue_reader.c: Likewise.
      	* normal/autofs.c: Likewise.
      	* normal/dyncmd.c: Likewise.
      
      	* include/grub/rescue.h: Removed.
      	* normal/command.h: Likewise.
      
      	* include/grub/script.h: Moved to ...
      	* include/grub/script_sh.h: ... Moved here.
      	* normal/execute.c: Moved to ...
      	* script/sh/execute.c: ... Moved here.
      	* normal/function.c: Moved to ...
      	* script/sh/function.c: ... Moved here.
      	* normal/lexer.c: Moved to ...
      	* script/sh/lexer.c: ... Moved here.
      	* normal/parser.y: Moved to ...
      	* script/sh/parser.y: ... Moved here.
      	* normal/script.c: Moved to ...
      	* script/sh/script.c: ... Moved here.
      
      	* normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
      	<grub/reader.h>.
      	(grub_exit_env): Removed.
      	(fs_module_list): Moved to normal/autofs.c.
      	(grub_file_getline): Don't handle comment here.
      	(free_menu): Skip removed field entry->commands.
      	(grub_normal_menu_addentry): Removed as grub_menu_entry, removed
      	script parameter.
      	(read_config_file): Removed nested parameter, change getline function.
      	(grub_enter_normal_mode): Removed.
      	(grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
      	(read_command_list): Likewise.
      	(autoload_fs_module): Moved to normal/autofs.c.
      	(read_fs_list): Likewise.
      	(reader_nested): New variable.
      	(grub_normal_execute): Run parser.sh to switch to sh parser.
      	(grub_cmd_rescue): Removed.
      	(cmd_normal): Removed.
      	(grub_cmd_normal): Unregister itself at the beginning. Don't register
      	rescue command.
      	(grub_cmdline_run): New function.
      	(grub_normal_reader_init): Likewise.
      	(grub_normal_read_line): Likewise.
      	(grub_env_write_pager): Likewise.
      	(cmdline): New variable.
      	(grub_normal_reader): Likewise.
      	(GRUB_MOD_INIT): Register normal reader and set as current, register
      	pager hook, register normal command with grub_register_command_prio,
      	so that it won't show up in command.lst.
      	(GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
      	grub_fs_autoload_hook.
      
      	* normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
      	(grub_menu_execute_entry): Replace grub_script_execute with
      	grub_parser_execute, change parameter to grub_command_execute.
      
      	* normal/menu_text.c: Remove <grub/script.h>.
      
      	* normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
      	and <grub/parser.h>.
      	(run): Change editor_getline to use new parser interface. Change
      	parameter to grub_command_execute.
      
      	* kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
      	<grub/reader.h> and <grub/parser.h>.
      	(grub_load_normal_mode): Execute normal command.
      	(grub_main): Call grub_register_core_commands,
      	grub_register_rescue_parser and grub_register_rescue_reader, use
      	grub_reader_loop to enter input loop.
      
      	* kern/parser.c (grub_parser_spli_cmdline): Change type of getline
      	parameter.
      	(grub_parser_class): New variable.
      	(grub_parser_execute): New function.
      
      	* loader/i386/multiboot.c: Remove <grub/rescue.h>.
      	* loader/multiboot2.c: Likewise.
      	* loader/sparc64/ieee1275/linux.c: Likewise.
      
      	* util/grub-emu.c (read_command_list): New dummy function.
      d558e6b5
  12. 30 Apr, 2009 1 commit
  13. 21 Mar, 2009 1 commit
    • bean's avatar
      2009-03-21 Bean <bean123ch@gmail.com> · b1b797cb
      bean authored
      	* commands/blocklist.c: Add include file <grub/command.h>, remove
      	<grub/normal.h> and <grub/arg.h>.
      	(grub_cmd_blocklist): Use the new command interface.
      	(GRUB_MOD_INIT): Likewise.
      	(GRUB_MOD_FINI): Likewise.
      	* commands/boot.c: Likewise.
      	* commands/cat.c: Likewise.
      	* commands/cmp.c: Likewise.
      	* commands/configfile.c: Likewise.
      	* commands/crc.c: Likewise.
      	* commands/echo.c: Likewise.
      	* commands/halt.c: Likewise.
      	* commands/handler.c: Likewise.
      	* commands/hdparm.c: Likewise.
      	* commands/help.c: Likewise.
      	* commands/hexdump.c: Likewise.
      	* commands/loadenv.c: Likewise.
      	* commands/ls.c: Likewise.
      	* commands/lsmmap.c: Likewise.
      	* commands/lspci.c: Likewise.
      	* commands/loadenv.c: Likewise.
      	* commands/read.c: Likewise.
      	* commands/reboot.c: Likewise.
      	* commands/search.c: Likewise.
      	* commands/sleep.c: Likewise.
      	* commands/test.c: Likewise.
      	* commands/usbtest.c: Likewise.
      	* commands/videotest.c: Likewise.
      	* commands/i386/cpuid.c: Likewise.
      	* commands/i386/pc/halt.c: Likewise.
      	* commands/i386/pc/play.c: Likewise.
      	* commands/i386/pc/pxecmd.c: Likewise.
      	* commands/i386/pc/vbeinfo.c: Likewise.
      	* commands/i386/pc/vbetest.c: Likewise.
      	* commands/ieee1275/suspend.c: Likewise.
      	* disk/loopback.c: Likewise.
      	* font/font_cmd.c: Likewise.
      	* hello/hello.c: Likewise.
      	* loader/efi/appleloader.c: Likewise.
      	* loader/efi/chainloader.c: Likewise.
      	* loader/i386/bsd.c: Likewise.
      	* loader/i386/efi/linux.c: Likewise.
      	* loader/i386/ieee1275/linux.c: Likewise.
      	* loader/i386/linux.c: Likewise.
      	* loader/i386/pc/chainloader.c: Likewise.
      	* loader/i386/pc/linux.c: Likewise.
      	* loader/powerpc/ieee1275/linux.c: Likewise.
      	* loader/multiboot_loader.c: Likewise.
      	* term/gfxterm.c: Likewise.
      	* term/i386/pc/serial.c: Likewise.
      	* term/terminfo.c: Likewise.
      
      	* term/i386/pc/vesafb.c: Removed <grub/arg.h>.
      	* term/i386/pc/vga.c: Likewise.
      	* video/readers/jpeg.c: Likewise.
      	* video/readers/png.c: Likewise.
      	* video/readers/tga.c: Likewise.
      
      	* util/grub-fstest (cmd_loopback): Removed.
      	(cmd_blocklist): Likewise.
      	(cmd_ls): Likewise.
      	(grub_register_command): Likewise.
      	(grub_unregister_command): Likewise.
      	(execute_command): Use grub_command_find to locate command and execute
      	it.
      
      	* include/grub/efi/chainloader.h: Removed.
      	* loader/efi/chainloader_normal.c: Likewise.
      	* loader/i386/bsd_normal.c: Likewise.
      	* loader/i386/pc/chainloader_normal.c: Likewise.
      	* loader/i386/pc/multiboot_normal.c: Likewise.
      	* loader/linux_normal.c: Likewise.
      	* loader/multiboot_loader_normal.c: Likewise.
      	* loader/powerpc/ieee1275/linux_normal.c: Likewise.
      
      	* gencmdlist.sh: Scan new registration command grub_register_extcmd
      	and grub_register_command_p1.
      
      	* conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
      	kern/command.c, lib/arg.c and commands/extcmd.c.
      	(pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
      	(minicmd_mod_SOURCES): New variable.
      	(minicmd_mod_CFLAGS): Likewise.
      	(minicmd_mod_LDFLAGS): Likewise.
      	(extcmd_mod_SOURCES): Likewise.
      	(extcmd_mod_CFLAGS): Likewise.
      	(extcmd_mod_LDFLAGS): Likewise.
      	(boot_mod_SOURCES): Removed.
      	(boot_mod_CFLAGS): Likewise.
      	(boot_mod_LDFLAGS): Likewise.
      
      	* conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
      	kern/corecmd.c.
      	(kernel_img_HEADERS): Add command.h.
      	(grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
      	commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
      	and lib/arg.c.
      	(pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
      	_multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
      	remove the corresponding normal mode command.
      	(normal_mod_SOURCES): Remove normal/arg.c.
      	* conf/i386-coreboot.rmk: Likewise.
      	* conf/i386-efi.rmk: Likewise.
      	* conf/i386-ieee1275.rmk: Likewise.
      	* conf/powerpc-ieee1275.rmk: Likewise.
      	* conf/x86_64-efi.rmk: Likewise.
      
      	* include/grub/arg.h: Move from here ...
      	* include/grub/lib/arg.h: ... to here.
      
      	* normal/arg.c: Move from here ...
      	* lib/arg.c: ... to here.
      
      	* commands/extcmd.c: New file.
      	* commands/minicmd.c: Likewise.
      	* include/grub/command.h: Likewise.
      	* include/grub/extcmd.h: Likewise.
      	* kern/command.c: Likewise.
      	* kern/corecmd.c: Likewise.
      
      	* kern/list.c (grub_list_iterate): Return int instead of void.
      	(grub_list_insert): New function.
      	(grub_prio_list_insert): Likewise.
      
      	* kern/rescue.c (grub_rescue_command): Removed.
      	(grub_rescue_command_list): Likewise.
      	(grub_rescue_register_command): Likewise.
      	(grub_rescue_unregister_command): Likewise.
      	(grub_rescue_cmd_boot): Move to minicmd.c
      	(grub_rescue_cmd_help): Likewise.
      	(grub_rescue_cmd_info): Likewise.
      	(grub_rescue_cmd_boot): Likewise.
      	(grub_rescue_cmd_testload): Likewise.
      	(grub_rescue_cmd_dump): Likewise.
      	(grub_rescue_cmd_rmmod): Likewise.
      	(grub_rescue_cmd_lsmod): Likewise.
      	(grub_rescue_cmd_exit): Likewise.
      	(grub_rescue_print_devices): Moved to corecmd.c.
      	(grub_rescue_print_files): Likewise.
      	(grub_rescue_cmd_ls): Likewise.
      	(grub_rescue_cmd_insmod): Likewise.
      	(grub_rescue_cmd_set): Likewise.
      	(grub_rescue_cmd_unset): Likewise.
      	(attemp_normal_mode): Use grub_command_find to get normal module.
      	(grub_enter_rescue_mode): Use grub_register_core_commands to register
      	commands, remove grub_rescue_regiter_command calls.
      
      	* normal/command.c (grub_regiser_command): Removed.
      	(grub_unregister_command): Likewise.
      	(grub_command_find): Likewise.
      	(grub_iterate_commands): Likewise.
      	(rescue_command): Likewise.
      	(export_command): Moved to corecmd.c.
      	(set_command): Removed.
      	(unset_command): Likewise.
      	(insmod_command): Likewise.
      	(rmmod_command): Likewise.
      	(lsmod_command): Likewise.
      	(grub_command_init): Likewise.
      
      	* normal/completion.c (iterate_command): Use cmd->prio to check for
      	active command.
      	(complete_arguments): Use grub_extcmd_t structure to find options.
      	(grub_normal_do_completion): Change function grub_iterate_commands to
      	grub_command_iterate.
      
      	* normal/execute.c (grub_script_execute_cmd): No need to parse
      	argument here.
      
      	* normal/main.c (grub_dyncmd_dispatcher): New function.
      	(read_command_list): Register unload commands as dyncmd.
      	(grub_cmd_normal): Use new command interface, register rescue,
      	unregister normal at entry, register normal, unregister rescue at exit.
      
      	* include/grub/list.h (grub_list_test_t): New type.
      	(grub_list_iterate): Return int instead of void.
      	(grub_list_insert): New function.
      	(GRUB_AS_NAMED_LIST_P): New macro.
      	(GRUB_AS_PRIO_LIST): Likewise.
      	(GRUB_AS_PRIO_LIST_P): Likewise.
      	(GRUB_PRIO_LIST_PRIO_MASK): New constant.
      	(GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
      	(grub_prio_list): New structure.
      	(grub_prio_list_insert): New function.
      	(grub_prio_list_remove): New inline function.
      
      	* include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
      	(GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
      	(GRUB_COMMAND_FLAG_MENU): Likewise.
      	(GRUB_COMMAND_FLAG_BOTH): Likewise.
      	(GRUB_COMMAND_FLAG_TITLE): Likewise.
      	(GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
      	(GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
      	(GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
      	(grub_command): Likewise.
      	(grub_register_command): Likewise.
      	(grub_command_find): Likewise.
      	(grub_iterate_commands): Likewise.
      	(grub_command_init): Likewise.
      	(grub_arg_parse): Likewise.
      	(grub_arg_show_help): Likewise.
      
      	* include/grub/rescue.h (grub_rescue_register_command): Removed.
      	(grub_rescue_unregister_command): Likewise.
      
      	* include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
      	grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
      	grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
      
      	* include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
      	grub_rescue_cmd_initrd.
      	* include/grub/i386/loader.h: Likewise.
      	* include/grub/x86_64/loader.h: Likewise.
      
      	* include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
      b1b797cb
  14. 22 Jul, 2007 1 commit
    • okuji's avatar
      2007-07-22 Yoshinori K. Okuji <okuji@enbug.org> · 5a79f472
      okuji authored
          Migrate to GNU General Public License Version 3.
      
          * COPYING: Replaced with the plain text version of GPLv3.
      
          * config.guess: Updated from gnulib.
          * config.sub: Likewise.
      
          * geninit.sh: Output a GPLv3 copyright notice.
          * geninitheader.sh: Likewise.
          * genmodsrc.sh: Likewise.
          * gensymlist.sh.in: Likewise.
      
          * boot/i386/pc/boot.S: Upgraded to GPLv3.
          * boot/i386/pc/diskboot.S: Likewise.
          * boot/i386/pc/pxeboot.S: Likewise.
          * commands/blocklist.c: Likewise.
          * commands/boot.c: Likewise.
          * commands/cat.c: Likewise.
          * commands/cmp.c: Likewise.
          * commands/configfile.c: Likewise.
          * commands/echo.c: Likewise.
          * commands/help.c: Likewise.
          * commands/ls.c: Likewise.
          * commands/search.c: Likewise.
          * commands/terminal.c: Likewise.
          * commands/test.c: Likewise.
          * commands/videotest.c: Likewise.
          * commands/i386/cpuid.c: Likewise.
          * commands/i386/pc/halt.c: Likewise.
          * commands/i386/pc/play.c: Likewise.
          * commands/i386/pc/reboot.c: Likewise.
          * commands/i386/pc/vbeinfo.c: Likewise.
          * commands/i386/pc/vbetest.c: Likewise.
          * commands/ieee1275/halt.c: Likewise.
          * commands/ieee1275/reboot.c: Likewise.
          * commands/ieee1275/suspend.c: Likewise.
          * disk/loopback.c: Likewise.
          * disk/lvm.c: Likewise.
          * disk/raid.c: Likewise.
          * disk/efi/efidisk.c: Likewise.
          * disk/i386/pc/biosdisk.c: Likewise.
          * disk/ieee1275/ofdisk.c: Likewise.
          * font/manager.c: Likewise.
          * fs/affs.c: Likewise.
          * fs/ext2.c: Likewise.
          * fs/fat.c: Likewise.
          * fs/fshelp.c: Likewise.
          * fs/hfs.c: Likewise.
          * fs/hfsplus.c: Likewise.
          * fs/iso9660.c: Likewise.
          * fs/jfs.c: Likewise.
          * fs/minix.c: Likewise.
          * fs/sfs.c: Likewise.
          * fs/ufs.c: Likewise.
          * fs/xfs.c: Likewise.
          * hello/hello.c: Likewise.
          * include/grub/acorn_filecore.h: Likewise.
          * include/grub/arg.h: Likewise.
          * include/grub/bitmap.h: Likewise.
          * include/grub/boot.h: Likewise.
          * include/grub/cache.h: Likewise.
          * include/grub/device.h: Likewise.
          * include/grub/disk.h: Likewise.
          * include/grub/dl.h: Likewise.
          * include/grub/elfload.h: Likewise.
          * include/grub/env.h: Likewise.
          * include/grub/err.h: Likewise.
          * include/grub/file.h: Likewise.
          * include/grub/font.h: Likewise.
          * include/grub/fs.h: Likewise.
          * include/grub/fshelp.h: Likewise.
          * include/grub/gzio.h: Likewise.
          * include/grub/hfs.h: Likewise.
          * include/grub/kernel.h: Likewise.
          * include/grub/loader.h: Likewise.
          * include/grub/lvm.h: Likewise.
          * include/grub/misc.h: Likewise.
          * include/grub/mm.h: Likewise.
          * include/grub/net.h: Likewise.
          * include/grub/normal.h: Likewise.
          * include/grub/parser.h: Likewise.
          * include/grub/partition.h: Likewise.
          * include/grub/pc_partition.h: Likewise.
          * include/grub/raid.h: Likewise.
          * include/grub/rescue.h: Likewise.
          * include/grub/script.h: Likewise.
          * include/grub/setjmp.h: Likewise.
          * include/grub/symbol.h: Likewise.
          * include/grub/term.h: Likewise.
          * include/grub/terminfo.h: Likewise.
          * include/grub/tparm.h: Likewise.
          * include/grub/types.h: Likewise.
          * include/grub/video.h: Likewise.
          * include/grub/efi/api.h: Likewise.
          * include/grub/efi/chainloader.h: Likewise.
          * include/grub/efi/console.h: Likewise.
          * include/grub/efi/console_control.h: Likewise.
          * include/grub/efi/disk.h: Likewise.
          * include/grub/efi/efi.h: Likewise.
          * include/grub/efi/pe32.h: Likewise.
          * include/grub/efi/time.h: Likewise.
          * include/grub/i386/linux.h: Likewise.
          * include/grub/i386/setjmp.h: Likewise.
          * include/grub/i386/types.h: Likewise.
          * include/grub/i386/efi/kernel.h: Likewise.
          * include/grub/i386/efi/loader.h: Likewise.
          * include/grub/i386/efi/time.h: Likewise.
          * include/grub/i386/pc/biosdisk.h: Likewise.
          * include/grub/i386/pc/boot.h: Likewise.
          * include/grub/i386/pc/chainloader.h: Likewise.
          * include/grub/i386/pc/console.h: Likewise.
          * include/grub/i386/pc/init.h: Likewise.
          * include/grub/i386/pc/kernel.h: Likewise.
          * include/grub/i386/pc/loader.h: Likewise.
          * include/grub/i386/pc/memory.h: Likewise.
          * include/grub/i386/pc/multiboot.h: Likewise.
          * include/grub/i386/pc/serial.h: Likewise.
          * include/grub/i386/pc/time.h: Likewise.
          * include/grub/i386/pc/vbe.h: Likewise.
          * include/grub/i386/pc/vbeblit.h: Likewise.
          * include/grub/i386/pc/vbefill.h: Likewise.
          * include/grub/i386/pc/vbeutil.h: Likewise.
          * include/grub/i386/pc/vga.h: Likewise.
          * include/grub/ieee1275/ieee1275.h: Likewise.
          * include/grub/ieee1275/ofdisk.h: Likewise.
          * include/grub/powerpc/libgcc.h: Likewise.
          * include/grub/powerpc/setjmp.h: Likewise.
          * include/grub/powerpc/types.h: Likewise.
          * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
          * include/grub/powerpc/ieee1275/console.h: Likewise.
          * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
          * include/grub/powerpc/ieee1275/kernel.h: Likewise.
          * include/grub/powerpc/ieee1275/loader.h: Likewise.
          * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
          * include/grub/powerpc/ieee1275/time.h: Likewise.
          * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
          * include/grub/sparc64/libgcc.h: Likewise.
          * include/grub/sparc64/setjmp.h: Likewise.
          * include/grub/sparc64/types.h: Likewise.
          * include/grub/sparc64/ieee1275/console.h: Likewise.
          * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
          * include/grub/sparc64/ieee1275/kernel.h: Likewise.
          * include/grub/sparc64/ieee1275/time.h: Likewise.
          * include/grub/util/biosdisk.h: Likewise.
          * include/grub/util/getroot.h: Likewise.
          * include/grub/util/lvm.h: Likewise.
          * include/grub/util/misc.h: Likewise.
          * include/grub/util/raid.h: Likewise.
          * include/grub/util/resolve.h: Likewise.
          * io/gzio.c: Likewise.
          * kern/device.c: Likewise.
          * kern/disk.c: Likewise.
          * kern/dl.c: Likewise.
          * kern/elf.c: Likewise.
          * kern/env.c: Likewise.
          * kern/err.c: Likewise.
          * kern/file.c: Likewise.
          * kern/fs.c: Likewise.
          * kern/loader.c: Likewise.
          * kern/main.c: Likewise.
          * kern/misc.c: Likewise.
          * kern/mm.c: Likewise.
          * kern/parser.c: Likewise.
          * kern/partition.c: Likewise.
          * kern/rescue.c: Likewise.
          * kern/term.c: Likewise.
          * kern/efi/efi.c: Likewise.
          * kern/efi/init.c: Likewise.
          * kern/efi/mm.c: Likewise.
          * kern/i386/dl.c: Likewise.
          * kern/i386/efi/init.c: Likewise.
          * kern/i386/efi/startup.S: Likewise.
          * kern/i386/pc/init.c: Likewise.
          * kern/i386/pc/lzo1x.S: Likewise.
          * kern/i386/pc/startup.S: Likewise.
          * kern/ieee1275/ieee1275.c: Likewise.
          * kern/powerpc/cache.S: Likewise.
          * kern/powerpc/dl.c: Likewise.
          * kern/powerpc/ieee1275/cmain.c: Likewise.
          * kern/powerpc/ieee1275/crt0.S: Likewise.
          * kern/powerpc/ieee1275/init.c: Likewise.
          * kern/powerpc/ieee1275/openfw.c: Likewise.
          * kern/sparc64/cache.S: Likewise.
          * kern/sparc64/dl.c: Likewise.
          * kern/sparc64/ieee1275/init.c: Likewise.
          * kern/sparc64/ieee1275/openfw.c: Likewise.
          * loader/efi/chainloader.c: Likewise.
          * loader/efi/chainloader_normal.c: Likewise.
          * loader/i386/efi/linux.c: Likewise.
          * loader/i386/efi/linux_normal.c: Likewise.
          * loader/i386/pc/chainloader.c: Likewise.
          * loader/i386/pc/chainloader_normal.c: Likewise.
          * loader/i386/pc/linux.c: Likewise.
          * loader/i386/pc/linux_normal.c: Likewise.
          * loader/i386/pc/multiboot.c: Likewise.
          * loader/i386/pc/multiboot_normal.c: Likewise.
          * loader/powerpc/ieee1275/linux.c: Likewise.
          * loader/powerpc/ieee1275/linux_normal.c: Likewise.
          * normal/arg.c: Likewise.
          * normal/cmdline.c: Likewise.
          * normal/command.c: Likewise.
          * normal/completion.c: Likewise.
          * normal/execute.c: Likewise.
          * normal/function.c: Likewise.
          * normal/lexer.c: Likewise.
          * normal/main.c: Likewise.
          * normal/menu.c: Likewise.
          * normal/menu_entry.c: Likewise.
          * normal/misc.c: Likewise.
          * normal/parser.y: Likewise.
          * normal/script.c: Likewise.
          * normal/i386/setjmp.S: Likewise.
          * normal/powerpc/setjmp.S: Likewise.
          * normal/sparc64/setjmp.S: Likewise.
          * partmap/acorn.c: Likewise.
          * partmap/amiga.c: Likewise.
          * partmap/apple.c: Likewise.
          * partmap/gpt.c: Likewise.
          * partmap/pc.c: Likewise.
          * partmap/sun.c: Likewise.
          * term/gfxterm.c: Likewise.
          * term/terminfo.c: Likewise.
          * term/efi/console.c: Likewise.
          * term/i386/pc/console.c: Likewise.
          * term/i386/pc/serial.c: Likewise.
          * term/i386/pc/vesafb.c: Likewise.
          * term/i386/pc/vga.c: Likewise.
          * term/ieee1275/ofconsole.c: Likewise.
          * util/biosdisk.c: Likewise.
          * util/console.c: Likewise.
          * util/genmoddep.c: Likewise.
          * util/getroot.c: Likewise.
          * util/grub-emu.c: Likewise.
          * util/grub-mkdevicemap.c: Likewise.
          * util/grub-probe.c: Likewise.
          * util/lvm.c: Likewise.
          * util/misc.c: Likewise.
          * util/raid.c: Likewise.
          * util/resolve.c: Likewise.
          * util/update-grub.in: Likewise.
          * util/update-grub_lib.in: Likewise.
          * util/grub.d/00_header.in: Likewise.
          * util/grub.d/10_hurd.in: Likewise.
          * util/grub.d/10_linux.in: Likewise.
          * util/i386/efi/grub-install.in: Likewise.
          * util/i386/efi/grub-mkimage.c: Likewise.
          * util/i386/pc/grub-install.in: Likewise.
          * util/i386/pc/grub-mkimage.c: Likewise.
          * util/i386/pc/grub-mkrescue.in: Likewise.
          * util/i386/pc/grub-setup.c: Likewise.
          * util/i386/pc/misc.c: Likewise.
          * util/powerpc/ieee1275/grub-install.in: Likewise.
          * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
          * util/powerpc/ieee1275/misc.c: Likewise.
          * video/bitmap.c: Likewise.
          * video/video.c: Likewise.
          * video/i386/pc/vbe.c: Likewise.
          * video/i386/pc/vbeblit.c: Likewise.
          * video/i386/pc/vbefill.c: Likewise.
          * video/i386/pc/vbeutil.c: Likewise.
          * video/readers/tga.c: Likewise.
      5a79f472
  15. 12 Jun, 2007 1 commit
    • robertmh's avatar
      2007-06-12 Robert Millan <rmh@aybabtu.com> · 0215dcbf
      robertmh authored
      	* normal/command.c (grub_command_execute): Use NULL rather than 0 for
      	"pager" assignment.
      	* util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
      	"pcdata".
      	* util/grub-probe.c (probe): Likewise for "drive_name".
      0215dcbf
  16. 30 Apr, 2006 1 commit
    • marco_g's avatar
      2006-04-29 Marco Gerards <marco@gnu.org> · eaef0553
      marco_g authored
      	* commands/configfile.c (grub_cmd_configfile): Execute the
      	configfile within its own context.
      
      	* include/grub/env.h (grub_env_context_open): New prototype.
      	(grub_env_context_close): Likewise.
      
      	* kern/env.c (grub_env): Removed.
      	(grub_env_sorted): Likewise.
      	(grub_env_context): New variable.
      	(grub_env_var_context): Likewise.
      	(grub_env_find): Search both the active context and the global
      	context.
      	(grub_env_context_open): New function.
      	(grub_env_context_close): Likewise.
      	(grub_env_insert): Likewise.
      	(grub_env_remove): Likewise.
      	(grub_env_export): Likewise.
      	(grub_env_set): Changed to use helper functions to avoid code
      	duplication.
      	(grub_env_iterate): Rewritten so both the current context and the
      	global context are being used.
      
      	* normal/command.c (export_command): New function.
      	(grub_command_init): Register the `export' function.
      eaef0553
  17. 16 Apr, 2006 1 commit
    • marco_g's avatar
      2006-16-04 Marco Gerards <marco@gnu.org> · 6de2ee99
      marco_g authored
      	* normal/command.c (grub_command_init): Remove the title command.
      
      	* normal/lexer.c (grub_script_yylex): Renamed from this...
      	(grub_script_yylex2): ... to this.
      	(grub_script_yylex): New function.  Temporary
      	introduced to filter some tokens.
      	(grub_script_yyerror): Print a newline.
      
      	* normal/main.c (read_config_file): Output information about the
      	lines that contain errors.  Wait for a key after all lines have
      	been processed.  Don't return an empty menu.
      
      	* normal/parser.y (func_mem): Don't initialize.
      	(menu_entry): Likewise.
      	(err): New variable.
      	(script): Don't return anything when an error was encountered.
      	(ws, returns): Removed rules.
      	(argument): Disabled concatenated variable support.
      	(arguments): Remove explicit separators.
      	(grubcmd): Likewise.
      	(function): Likewise.
      	(menuentry): Likewise.
      	(if): Likewise.
      	(commands): Likewise.  Add error handling.
      
      	* normal/script.c (grub_script_create_cmdline): If
      	`grub_script_parsed' is 0, assume the parser encountered an error.
      6de2ee99
  18. 18 Nov, 2005 1 commit
    • okuji's avatar
      2005-11-18 Yoshinori K. Okuji <okuji@enbug.org> · 16f820c8
      okuji authored
              * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
              (grub_script.tab.c): ... here.
      
              * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
              (grub_script.tab.c): ... here.
      
              * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
              (grub_script.tab.c): ... here.
      
              * normal/command.c (grub_command_find): Fixed a memory leak of
              MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
      16f820c8
  19. 07 Nov, 2005 1 commit
    • marco_g's avatar
      2005-11-06 Marco Gerards <mgerards@xs4all.nl> · daac212a
      marco_g authored
      	Add initial scripting support.
      
      	* commands/test.c: New file.
      	* include/grub/script.h: Likewise.
      	* normal/execute.c: Likewise.
      	* normal/function.c: Likewise.
      	* normal/lexer.c: Likewise.
      	* normal/parser.y: Likewise.
      	* normal/script.c: Likewise.
      
      	* configure.ac: Add `AC_PROG_YACC' test.
      
      	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
      	`normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
      	`normal/function.c' and `normal/script.c'.
      	(normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
      	`grub_script.tab.c', `normal/function.c' and `normal/script.c'.
      	(test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New variables.
      	(pkgdata_MODULES): Add `test.mod'.
      	(grub_script.tab.c): New rule.
      	(grub_script.tab.h): Likewise.
      
      	* include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
      
      	* include/grub/normal.h (grub_test_init): New prototype.
      	(grub_test_fini): Likewise.
      
      	* normal/command.c: Include <grub/script.h>.
      	(grub_command_execute): Rewritten.
      
      	* util/grub-emu.c (main): Call `grub_test_init' and
      	`grub_test_fini'.
      daac212a
  20. 24 Oct, 2005 1 commit
    • marco_g's avatar
      2005-10-24 Marco Gerards <mgerards@xs4all.nl> · 04ccf3ec
      marco_g authored
      	* include/grub/parser.h: New file.
      
      	* kern/parser.c: Likewise.
      
      	* conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
      	(grub_setup_SOURCES): Likewise.
      	(grub_probefs_SOURCES): Likewise.
      	(grub_emu_SOURCES): Likewise.
      	(kernel_img_HEADERS): Add `parser.h'.
      
      	* conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
      	(grub_emu_SOURCES): Add `kern/parser.c'.
      	(grubof_SOURCES): Likewise.
      
      	* conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
      	(grubof_SOURCES): Add `kern/parser.c'.
      
      	* include/grub/misc.h (grub_split_cmdline): Removed prototype.
      
      	* kern/misc.c (grub_split_cmdline): Removed function.
      
      	* kern/rescue.c: Include <grub/parser.h>.
      	(grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
      	of `grub_split_cmdline'.
      
      	* normal/command.c: Include <grub/parser.h>.
      	(grub_command_execute):  Use `grub_parser_split_cmdline' instead
      	of `grub_split_cmdline'.
      
      	* normal/completion.c: Include <grub/parser.h>.
      	(cmdline_state): New variable.
      	(iterate_dir): End the filename with a quote depending on the
      	command line state.
      	(get_state): new function.
      	(grub_normal_do_completion): Use `grub_parser_split_cmdline' to
      	split the arguments and determine the current argument.  When the
      	argument string is not quoted, escape all spaces.
      04ccf3ec
  21. 15 Aug, 2005 1 commit
    • okuji's avatar
      2005-08-14 Yoshinori K. Okuji <okuji@enbug.org> · 0a74e62f
      okuji authored
              * normal/menu.c (run_menu_entry):
      
              * normal/command.c (grub_command_execute): If INTERACTIVE is
              false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
              CMDLINE. Disable the pager if INTERACTIVE is true.
              All callers are changed.
      
              * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
              before reading a config file.
              * normal/main.c (read_config_file): Even if a command is not
              found, register it if it is within an entry.
      
              * util/grub-emu.c: Include sys/types.h and unistd.h.
              (options): Added --hold.
              (struct arguments): Added a new member "hold".
              (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
              missing.
              (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
              cleared by a debugger, if it is not zero.
      
              * include/grub/normal.h (grub_command_execute): Add an argument
              INTERACTIVE.
      0a74e62f
  22. 13 Aug, 2005 1 commit
    • okuji's avatar
      2005-08-12 Yoshinori K. Okuji <okuji@enbug.org> · 8de3495c
      okuji authored
              * DISTLIST: Added normal/completion.c.
      
              * normal/completion.c: New file.
      
              * term/i386/pc/console.c (grub_console_getwh): New function.
              (grub_console_term): Assign grub_console_getwh to getwh.
      
              * normal/cmdline.c (grub_tab_complete): Removed. Now the same
              function is defined in normal/completion.c as
              grub_normal_do_completion.
              (grub_cmdline_get): Use grub_normal_do_completion instead of
              grub_tab_complete.
      
              * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
              returns non-zero, otherwise return 0.
              (grub_partition_iterate): First, probe the partition map. Then,
              call ITERATE only for this partition map.
      
              * kern/misc.c (grub_strncmp): Rewritten.
      
              * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
              returns non-zero. Otherwise return 0.
      
              * include/grub/partition.h (grub_partition_map_iterate): Return
              int instead of void.
      
              * include/grub/normal.h (grub_normal_do_completion): New prototype.
      
              * include/grub/misc.h (grub_strncmp): Change the type of N to
              grub_size_t.
      
              * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
              of void.
      
              * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
              unsigned explictly before comparing it with I.
      
              * kern/main.c (grub_env_write_root): Add the attribute unused into
              VAR.
      
              * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
              normal/completion.c.
              (normal_mod_SOURCES): Likewise.
              * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
              (normal_mod_SOURCES): Likewise.
      
              * normal/command.c (grub_iterate_commands): If ITERATE returns
              non-zero, return one immediately.
      8de3495c
  23. 18 Jul, 2005 1 commit
    • okuji's avatar
      2005-07-17 Yoshinori Okuji <okuji@enbug.org> · 502c87e8
      okuji authored
      	* commands/cat.c (GRUB_MOD_INIT): Use better documentation.
      	(grub_cat_init): Likewise.
      	* loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
      	(options): Likewise.
      	* commands/configfile.c (GRUB_MOD_INIT): Likewise.
      	(grub_configfile_init): Likewise.
      	* font/manager.c (GRUB_MOD_INIT): Likewise.
      	* commands/help.c (GRUB_MOD_INIT): Likewise.
      	(grub_help_init): Likewise.
      	* normal/command.c (grub_command_init): Likewise.
      	* loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
      	* disk/loopback.c (grub_loop_init): Likewise.
      	(GRUB_MOD_INIT): Likewise.
      	* commands/ls.c (grub_ls_init): Likewise.
      	(GRUB_MOD_INIT): Likewise.
      	(options): Likewise.
      	* commands/boot.c (grub_boot_init): Likewise.
      	(GRUB_MOD_INIT): Likewise.
      	* loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
      	* commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
      	(GRUB_MOD_INIT): Likewise.
      	* commands/cmp.c (grub_cmp_init): Likewise.
      	(GRUB_MOD_INIT): Likewise.
      
      	* normal/arg.c: Use <> instead of "" to include header files.
      	(SHORT_ARG_HELP): New macro.
      	(SHORT_ARG_USAGE): Likewise.
      	(help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
      	of 'h' and 'u' for help and usage, respectively. Use more GNU-like
      	descriptions.
      	(find_short): Check if C is 'h' or 'u' explicitly.
      	(grub_arg_show_help): Use space characters instead of tabs. Treat
      	SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
      	are shown with --help and --usage only if they are not used for
      	the command itself.
      	(parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
      	'h' and 'u'.
      
      	* include/grub/arg.h (struct grub_arg_option): Add the qualifier
      	const into "longarg". Change the type of "shortarg" to int.
      502c87e8
  24. 08 Mar, 2005 1 commit
    • okuji's avatar
      2005-03-08 Yoshinori Okuji <okuji@enbug.org> · 5822ff87
      okuji authored
        Automatic loading of commands is supported.
      
        * normal/main.c (read_command_list): New function.
        (grub_normal_execute): Call read_command_list.
      
        * normal/command.c (grub_register_command): Return zero or CMD.
        Allocate CMD->NAME from the heap.
        Initialize CMD->MODULE_NAME to zero.
        Find the same name as well. If the same command is found and it is
        a dummy command, overwrite members. If it is not a dummy command,
        return zero.
        (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
        (grub_command_find): If a dummy command is found, load a module
        and retry to find a command only once.
      
        * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
        make sure that each command is loaded.
      
        * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
        macro.
        (struct grub_command): Remove const from the member `name'.
        Add a new member `module_name'.
        (grub_register_command): Return grub_command_t.
      
        * commands/help.c (grub_cmd_help): Call grub_command_find to make
        sure that each command is loaded.
      
        * genmk.rb (PModule::rule): Specify a module name without the
        suffix ".mod" to gencmdlist.sh.
      5822ff87
  25. 01 Feb, 2005 1 commit
    • marco_g's avatar
      2005-01-31 Marco Gerards <metgerards@student.han.nl> · 990cf3aa
      marco_g authored
      	* commands/help.c: New file.
      	* normal/arg.c (show_help): Renamed to...
      	(grub_arg_show_help): ... this.
      	* commands/i386/pc/halt.c: New file.
      	* commands/i386/pc/reboot.c: Likewise.
      	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
      	(pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
      	(help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
      	(reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
      	variables.
      	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
      	`commands/help.c'.
      	(pkgdata_MODULES): Add `help.mod'.
      	(help_mod_SOURCES, help_mod_CFLAGS): New variables.
      	* grub/i386/pc/init.h (grub_reboot): New prototype.
      	(grub_halt): Likewise.
      	* include/grub/normal.h (grub_arg_show_help): New prototype.
      	(grub_help_init): Likewise.
      	(grub_help_fini): Likewise.
      	* util/grub-emu.c (main): Initialize and deinitialize the help
      	command.
      
      	* normal/cmdline.c (grub_cmdline_get): Doc fix.
      
      	* normal/command.c (grub_command_init): Fixed the description of
      	the `set' and `unset' commands.
      990cf3aa
  26. 17 Sep, 2004 1 commit
    • marco_g's avatar
      2004-09-17 Marco Gerards <metgerards@student.han.nl> · b47efe30
      marco_g authored
      	Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
      	can be loaded from normal mode.
      
      	* conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
      	`multiboot.mod'.
      	(linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
      	(multiboot_mod_CFLAGS): New variables.
      	* loader/i386/pc/linux_normal.c: New file.
      	* loader/i386/pc/multiboot_normal.c: Likewise.
      
      	* loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
      	attribute `unused'.
      
      	* fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
      	`fdiro' to read the mode information from instead of `diro'.
      
      	* fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
      	looking up a symlink.
      
      	* include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
      	macro.
      	* normal/command.c (grub_command_execute): Don't parse the
      	arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
      	flags of the command.
      
      	* normal/menu.c (grub_menu_run): Fix typo.
      b47efe30
  27. 04 Apr, 2004 1 commit
    • okuji's avatar
      2004-04-04 Yoshinori K. Okuji <okuji@enbug.org> · 4b13b216
      okuji authored
      	All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
      	and grub_, respectively. Because the conversion is trivial and
      	mechanical, I omit the details here. Please refer to the CVS
      	if you need more information.
      4b13b216
  28. 13 Mar, 2004 1 commit
    • marco_g's avatar
      2004-03-14 Marco Gerards <metgerards@student.han.nl> · db1771cf
      marco_g authored
      	* commands/boot.c: New file.
      	* commands/cat.c: Likewise.
      	* commands/cmp.c: Likewise.
      	* commands/ls.c: Likewise.
      	* commands/terminal.c: Likewise.
      	* normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
      	(pupa_register_command): Changed interface to match the new
      	argument parser.
      	(pupa_command_execute): Changed (almost rewritten) so it uses
      	pupa_split_command.  Added support for setting variables using the
      	syntax `foo=bar'.
      	(rescue_command): Changed to work with the new argument parser.
      	(terminal_command): Moved from here to commands/terminal.c.
      	(set_command): New function.
      	(unset_command): New function.
      	(insmod_command): New function.
      	(rmmod_command): New function.
      	(lsmod_command): New function.
      	(pupa_command_init): Don't initialize the command terminal
      	anymore.  Initialize the commands set, unset, insmod, rmmod and
      	lsmod.
      	* conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
      	(kernel_img_HEADERS): Add arg.h and env.h.
      	(pupa_mkimage_LDFLAGS): Add kern/env.c.
      	(pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
      	commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
      	normal/arg.c.
      	(pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
      	terminal.mod.
      	(normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
      	(boot_mod_SOURCES): New variable.
      	(terminal_mod_SOURCES): Likewise.
      	(ls_mod_SOURCES): Likewise.
      	(cmp_mod_SOURCES): Likewise.
      	(cat_mod_SOURCES): Likewise.
      
      	* normal/arg.c: New file.
      	* kern/env.c: Likewise.
      	* include/pupa/arg.h: Likewise.
      	* include/pupa/env.h: Likewise.
      	* font/manager.c (font_command): Changed to match argument parsing
      	interface changes.
      	(PUPA_MOD_INIT): Likewise.
      	* hello/hello.c (pupa_cmd_hello): Likewise.
      	(PUPA_MOD_INIT): Likewise.
      	* include/pupa/disk.h: Include <pupa/device.h>.
      	(pupa_print_partinfo): New prototype.
      	* include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
      	(pupa_dl_get_prefix): Likewise.
      	* include/pupa/misc.h: Include <pupa/err.h>.
      	(pupa_isgraph): New prototype.
      	(pupa_isdigit): Likewise.
      	(pupa_split_cmdline): Likewise.
      	* include/pupa/normal.h: Include <pupa/arg.h>.
      	(pupa_command): Changed the prototype of the member `func' to
      	match the argument parsing interface.  Added member `options'.
      	(pupa_register_command): Updated to match function.
      	(pupa_arg_parse): New prototype.
      	(pupa_hello_init) [PUPA_UTIL]: New prototype.
      	(pupa_hello_fini) [PUPA_UTIL]: Likewise.
      	(pupa_ls_init) [PUPA_UTIL]: Likewise.
      	(pupa_ls_fini) [PUPA_UTIL]: Likewise.
      	(pupa_cat_init) [PUPA_UTIL]: Likewise.
      	(pupa_cat_fini) [PUPA_UTIL]: Likewise.
      	(pupa_boot_init) [PUPA_UTIL]: Likewise.
      	(pupa_boot_fini) [PUPA_UTIL]: Likewise.
      	(pupa_cmp_init) [PUPA_UTIL]: Likewise.
      	(pupa_cmp_fini) [PUPA_UTIL]: Likewise.
      	(pupa_terminal_init) [PUPA_UTIL]: Likewise.
      	(pupa_terminal_fini) [PUPA_UTIL]: Likewise.
      	* kern/disk.c: Include <pupa/file.h>.
      	(pupa_print_partinfo): New function.
      	* kern/dl.c: Include <pupa/env.h>.
      	(pupa_dl_dir): Variable removed.
      	(pupa_dl_load): Use the environment variable `prefix' instead of
      	the variable pupa_dl_dir.
      	(pupa_dl_set_prefix): Function removed.
      	(pupa_dl_get_prefix): Likewise.
      	* kern/i386/pc/init.c: Include <pupa/env.h>.
      	(pupa_machine_init): Use the environment variable `prefix' instead of
      	using pupa_dl_set_prefix to set the prefix.
      	* kern/main.c: Include <pupa/env.h>.
      	(pupa_set_root_dev): Use the environment variable `prefix' instead of
      	using pupa_dl_get_prefix to get the prefix.
      	* kern/misc.c: Include <pupa/env.h>.
      	(pupa_isdigit): New function.
      	(pupa_isgraph): Likewise.
      	(pupa_ftoa): Likewise.
      	(pupa_vsprintf): Added support for printing values of the type
      	`double'.  Make it possible to format variable output when using
      	formatting like `%1.2%f'.
      	(pupa_split_cmdline): New function.
      	* kern/rescue.c: Include <pupa/env.h>.
      	(next_word): Removed function.
      	(pupa_rescue_cmd_prefix): Likewise.
      	(pupa_rescue_cmd_set): New function.
      	(pupa_rescue_cmd_unset): New function.
      	(pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
      	split the command line instead of splitting it here.  Added
      	support for setting variables using the syntax `foo=bar'.  Don't
      	initialize the prefix command anymore.  Initialized the set and
      	unset commands.
      	* normal/cmdline.c: Include <pupa/env.h>.
      	(pupa_tab_complete): Added prototypes for print_simple_completion,
      	print_partition_completion, add_completion, iterate_commands,
      	iterate_dev, iterate_part and iterate_dir. Moved code to print
      	partition information from here to kern/disk.c.
      	(pupa_cmdline_run): Don't check if the funtion exists anymore.
      	* normal/main.c: Include <pupa/env.h>.
      	(pupa_rescue_cmd_normal): Use the environment variable `prefix'
      	instead of using pupa_dl_get_prefix to get the prefix.
      	* term/i386/pc/vga.c: Include <pupa/arg.h>.
      	(check_vga_mem): Cast pointers to `void *' to silence a gcc
      	warning.
      	(pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
      	(pupa_vga_setcolor): Declare unused variables with `__attribute__
      	((unused))' to silence a gcc warning.
      	(pupa_vga_setcolor): Likewise.
      	(debug_command): Changed to match argument parsing
      	interface changes.
      	* util/pupa-emu.c: Include <pupa/env.h>.
      	(options): Added 0's for unused fields to silence a gcc warning.
      	(argp): Likewise.
      	(main): Use the environment variable `prefix' instead of using
      	pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
      	boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
      	and terminal.
      
      	* util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
      	* util/misc.c: Include <malloc.h>.
      	(pupa_malloc): Rewritten so errors are correctly reported.
      	(pupa_realloc): Likewise.
      	(pupa_memalign): Likewise.
      	(pupa_mm_init_region): Declare unused variables with
      	`__attribute__ ((unused))' to silence a gcc warning.
      	* normal/i386/setjmp.S: Remove tab at the end of the file to
      	silence a gcc warning.
      	* loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
      	variables with `__attribute__ ((unused))' to silence a gcc
      	warning.
      	* loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
      	local variable i unsigned to silence a gcc warning.
      
      	* kern/term.c: Include <pupa/misc.h>.
      	(pupa_more_lines): New variable.
      	(pupa_more): Likewise.
      	(pupa_putcode): When the pager is active pause at the end of every
      	screen.
      	(pupa_set_more): New function.
      	* include/pupa/term.h (pupa_set_more): New prototype.
      db1771cf
  29. 24 Feb, 2004 1 commit
    • okuji's avatar
      shinori K. Okuji <okuji@enbug.org> · 8367695c
      okuji authored
      	* genkernsyms.sh: Updated copyright information.
      	* genmk.rb: Likewise.
      	* genmodsrc.sh: Likewise.
      	* gensymlist.sh: Likewise.
      	* boot/i386/pc/boot.S: Likewise.
      	* boot/i386/pc/diskboot.S: Likewise.
      	* disk/i386/pc/biosdisk.c: Likewise.
      	* disk/i386/pc/partition.c: Likewise.
      	* font/manager.c: Likewise.
      	* fs/ext2.c: Likewise.
      	* fs/fat.c: Likewise.
      	* include/pupa/boot.h: Likewise.
      	* include/pupa/device.h: Likewise.
      	* include/pupa/disk.h: Likewise.
      	* include/pupa/dl.h: Likewise.
      	* include/pupa/elf.h: Likewise.
      	* include/pupa/err.h: Likewise.
      	* include/pupa/file.h: Likewise.
      	* include/pupa/font.h: Likewise.
      	* include/pupa/fs.h: Likewise.
      	* include/pupa/kernel.h: Likewise.
      	* include/pupa/loader.h: Likewise.
      	* include/pupa/misc.h: Likewise.
      	* include/pupa/mm.h: Likewise.
      	* include/pupa/net.h: Likewise.
      	* include/pupa/normal.h: Likewise.
      	* include/pupa/rescue.h: Likewise.
      	* include/pupa/setjmp.h: Likewise.
      	* include/pupa/symbol.h: Likewise.
      	* include/pupa/term.h: Likewise.
      	* include/pupa/types.h: Likewise.
      	* include/pupa/i386/setjmp.h: Likewise.
      	* include/pupa/i386/types.h: Likewise.
      	* include/pupa/i386/pc/biosdisk.h: Likewise.
      	* include/pupa/i386/pc/boot.h: Likewise.
      	* include/pupa/i386/pc/console.h: Likewise.
      	* include/pupa/i386/pc/init.h: Likewise.
      	* include/pupa/i386/pc/kernel.h: Likewise.
      	* include/pupa/i386/pc/linux.h: Likewise.
      	* include/pupa/i386/pc/loader.h: Likewise.
      	* include/pupa/i386/pc/memory.h: Likewise.
      	* include/pupa/i386/pc/multiboot.h: Likewise.
      	* include/pupa/i386/pc/partition.h: Likewise.
      	* include/pupa/i386/pc/time.h: Likewise.
      	* include/pupa/i386/pc/vga.h: Likewise.
      	* include/pupa/i386/pc/util/biosdisk.h: Likewise.
      	* include/pupa/util/getroot.h: Likewise.
      	* include/pupa/util/misc.h: Likewise.
      	* include/pupa/util/resolve.h: Likewise.
      	* kern/device.c: Likewise.
      	* kern/disk.c: Likewise.
      	* kern/dl.c: Likewise.
      	* kern/err.c: Likewise.
      	* kern/file.c: Likewise.
      	* kern/fs.c: Likewise.
      	* kern/loader.c: Likewise.
      	* kern/main.c: Likewise.
      	* kern/misc.c: Likewise.
      	* kern/mm.c: Likewise.
      	* kern/rescue.c: Likewise.
      	* kern/term.c: Likewise.
      	* kern/i386/dl.c: Likewise.
      	* kern/i386/pc/init.c: Likewise.
      	* kern/i386/pc/lzo1x.S: Likewise.
      	* kern/i386/pc/startup.S: Likewise.
      	* loader/i386/pc/chainloader.c: Likewise.
      	* loader/i386/pc/linux.c: Likewise.
      	* loader/i386/pc/multiboot.c: Likewise.
      	* normal/cmdline.c: Likewise.
      	* normal/command.c: Likewise.
      	* normal/main.c: Likewise.
      	* normal/menu.c: Likewise.
      	* normal/i386/setjmp.S: Likewise.
      	* term/i386/pc/console.c: Likewise.
      	* term/i386/pc/vga.c: Likewise.
      	* util/console.c: Likewise.
      	* util/genmoddep.c: Likewise.
      	* util/misc.c: Likewise.
      	* util/pupa-emu.c: Likewise.
      	* util/resolve.c: Likewise.
      	* util/unifont2pff.rb: Likewise.
      	* util/i386/pc/biosdisk.c: Likewise.
      	* util/i386/pc/getroot.c: Likewise.
      	* util/i386/pc/pupa-mkimage.c: Likewise.
      	* util/i386/pc/pupa-setup.c: Likewise.
      8367695c
  30. 04 Dec, 2003 1 commit
    • marco_g's avatar
      2003-12-03 Marco Gerards <metgerards@student.han.nl> · 5aded270
      marco_g authored
      	* fs/ext2.c (pupa_ext2_label): New function.
      	(pupa_ext2_fs): Added label.
      	* fs/fat.c (pupa_fat_label): New function.
      	(pupa_fat_fs): Added label.
      	* include/pupa/fs.h (struct pupa_fs): Added prototype label.
      
      	* kern/misc.c (pupa_strndup): New function.
      	* include/pupa/misc.h (pupa_strndup): New prototype.
      
      	* include/pupa/normal.h: Include <pupa/err.h>.
      	(pupa_set_history): New prototype.
      	(pupa_iterate_commands): New prototype.
      	* normal/cmdline.c: Include <pupa/machine/partition.h>,
      	<pupa/disk.h>, <pupa/file.h>.
      	(hist_size): New variable.
      	(hist_lines): Likewise.
      	(hist_end): Likewise.
      	(hist_used): Likewise.
      	(pupa_set_history): New function.
      	(pupa_history_get): Likewise.
      	(pupa_history_add): Likewise.
      	(pupa_history_replace): Likewise.
      	(pupa_tab_complete): Likewise.
      	(pupa_cmdline_run): Added tab completion and history buffer.  Tab
      	completion shows partitionnames while completing partitions, this
      	feature was suggested by Jeff Bailey.
      	* normal/command.c (pupa_iterate_commands): New function.
      	* normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
      	(pupa_normal_init): Initialize history buffer.
      	(PUPA_MOD_INIT): Likewise.
      	(pupa_normal_fini): Free the history buffer.
      	(PUPA_MOD_FINI): Likewise.
      
      	* util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
      	key.
      
      	* aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
      	* configure.ac [i386]: Check for regparam bug.
      	(NESTED_FUNC_ATTR) [! i386]: Defined.
      5aded270
  31. 26 Sep, 2003 1 commit
    • okuji's avatar
      2003-09-25 Yoshinori K. Okuji <okuji@enbug.org> · 18d9c7cd
      okuji authored
      	I forgot to check in these changes for a long time. This adds
      	incomplete support for VGA console, and this is still very
      	buggy. Also, a lot of consideration is required for I18N,
      	UNICODE, and VGA font issues. Therefore, assume that this is
      	such that "better than nothing".
      
      	* font/manager.c: New file.
      	* include/pupa/font.h: Likewise.
      	* include/pupa/i386/pc/vga.h: Likewise.
      	* term/i386/pc/vga.c: Likewise.
      	* util/unifont2pff.rb: Likewise.
      
      	* conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
      	(pkgdata_MODULES): Added vga.mod and font.mod.
      	(vga_mod_SOURCES): New variables.
      	(vga_mod_CFLAGS): Likewise.
      	(font_mod_SOURCES): Likewise.
      	(font_mod_CFLAGS): Likewise.
      
      	* include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
      
      	* include/pupa/term.h: Include pupa/err.h.
      	(struct pupa_term): Added init and fini.
      	Changed the argument of putchar to pupa_uint32_t.
      
      	* include/pupa/i386/pc/console.h: Include pupa/symbol.h.
      	(pupa_console_real_putchar): New prototype.
      	(pupa_console_putchar): Removed.
      	(pupa_console_checkkey): Exported.
      	(pupa_console_getkey): Likewise.
      
      	* kern/misc.c (pupa_vsprintf): Add support for UNICODE
      	characters.
      
      	* kern/term.c (pupa_term_set_current): Rewritten.
      	(pupa_putchar): Likewise.
      	(pupa_putcode): New function.
      
      	* kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
      	(pupa_console_real_putchar): ... this.
      	(pupa_vga_set_mode): New function.
      	(pupa_vga_get_font): Likewise.
      
      	* normal/command.c: Include pupa/term.h.
      	(terminal_command): New function.
      	(pupa_command_init): Register the command "terminal".
      
      	* normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
      	(DISP_UP): Likewise.
      	(DISP_RIGHT): Likewise.
      	(DISP_DOWN): Likewise.
      	(DISP_HLINE): Likewise.
      	(DISP_VLINE): Likewise.
      	(DISP_UL): Likewise.
      	(DISP_UR): Likewise.
      	(DISP_LL): Likewise.
      	(DISP_LR): Likewise.
      
      	* term/i386/pc/console.c (pupa_console_putchar): New function.
      18d9c7cd
  32. 20 Jan, 2003 1 commit
    • okuji's avatar
      2003-01-20 Yoshinori K. Okuji <okuji@enbug.org> · ce5bf700
      okuji authored
      	* include/pupa/normal.h: New file.
      	* include/pupa/setjmp.h: Likewise.
      	* include/pupa/i386/setjmp.h: Likewise.
      	* normal/cmdline.c: Likewise.
      	* normal/command.c: Likewise.
      	* normal/main.c: Likewise.
      	* normal/menu.c: Likewise.
      	* normal/i386/setjmp.S: Likewise.
      
      	* loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
      	(pupa_rescue_cmd_initrd): Likewise.
      
      	* loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
      	Likewise.
      
      	* kern/i386/pc/startup.S (translation_table): New variable.
      	(translate_keycode): New function.
      	(pupa_console_getkey): Call translate_keycode.
      
      	* kern/rescue.c (attempt_normal_mode): New function.
      	(pupa_enter_rescue_mode): Attempt to execute the normal mode. If
      	it failed, print a message.
      
      	* kern/mm.c (pupa_real_malloc): Print more information when a
      	free magic is broken.
      	(pupa_free): If the first free header is not free actually, set
      	it to P.
      
      	* kern/main.c (pupa_load_normal_mode): Just load the module
      	"normal".
      	(pupa_main): Don't print the message
      	"Entering into rescue mode..." here.
      
      	* include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
      	Declared.
      	(pupa_rescue_cmd_initrd): Likewise.
      	(pupa_rescue_cmd_initrd): Likewise.
      
      	* include/pupa/symbol.h (FUNCTION): Specify the type.
      	(VARIABLE): Likewise.
      
      	* include/pupa/err.h (pupa_err_t): Added
      	PUPA_ERR_UNKNOWN_COMMAND.
      
      	* include/pupa/dl.h (pupa_dl_set_prefix): Exported.
      	(pupa_dl_get_prefix): Likewise.
      
      	* conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
      	Added _chain.mod and _linux.mod instead of chain.mod and
      	linux.mod.
      	(chain_mod_SOURCES): Renamed to ...
      	(_chain_mod_SOURCES): ... this.
      	(chain_mod_CFLAGS): Renamed to ...
      	(_chain_mod_CFLAGS): ... this.
      	(linux_mod_SOURCES): Renamed to ...
      	(_linux_mod_SOURCES): ... this.
      	(linux_mod_CFLAGS): Renamed to ...
      	(_linux_mod_CFLAGS): ... this.
      	(normal_mod_SOURCES): New variable.
      	(normal_mod_CFLAGS): Likewise.
      	(normal_mod_ASFLAGS): Likewise.
      
      2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
      
      	* kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
      	possible.
      
      	* kern/dl.c (pupa_dl_ref): Refer dependending modules
      	recursively.
      	(pupa_dl_unref): Unrefer depending modules recursively.
      	Don't call pupa_dl_unload implicitly, because PUPA can crash if
      	a module is unloaded before one depending on that module is
      	unloaded.
      	(pupa_dl_unload): Unload depending modules explicitly,
      	if possible.
      ce5bf700