]> git.ipfire.org Git - thirdparty/grub.git/commit
2005-03-08 Yoshinori Okuji <okuji@enbug.org>
authorokuji <okuji@localhost>
Tue, 8 Mar 2005 01:01:06 +0000 (01:01 +0000)
committerokuji <okuji@localhost>
Tue, 8 Mar 2005 01:01:06 +0000 (01:01 +0000)
commit5822ff87a221efce7ee75a2819f8cb064b1e509e
treee5a4f97a0531f4e0acb79a99d9aecead16cbda0d
parent7b1f4b5715c7ce191b66cea89541a58838955522
2005-03-08  Yoshinori Okuji  <okuji@enbug.org>

  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.
ChangeLog
commands/help.c
conf/i386-pc.mk
conf/powerpc-ieee1275.mk
genmk.rb
include/grub/normal.h
normal/cmdline.c
normal/command.c
normal/main.c