Remove deprecated root command.

* grub-core/commands/minicmd.c (grub_mini_cmd_root): Removed. All users
	updated.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-09-14 22:21:35 +02:00
parent 58db070de1
commit 545b752f88
2 changed files with 8 additions and 39 deletions

View file

@ -1,3 +1,10 @@
2010-09-14 Vladimir Serbinenko <phcoder@gmail.com>
Remove deprecated root command.
* grub-core/commands/minicmd.c (grub_mini_cmd_root): Removed. All users
updated.
2010-09-14 Vladimir Serbinenko <phcoder@gmail.com>
* util/i386/pc/grub-setup.c: Merge this ...

View file

@ -108,40 +108,6 @@ grub_rescue_cmd_info (void)
}
#endif
/* root [DEVICE] */
static grub_err_t
grub_mini_cmd_root (struct grub_command *cmd __attribute__ ((unused)),
int argc, char *argv[])
{
grub_device_t dev;
grub_fs_t fs;
if (argc > 0)
{
char *device_name = grub_file_get_device_name (argv[0]);
if (! device_name)
return grub_errno;
grub_env_set ("root", device_name);
grub_free (device_name);
}
dev = grub_device_open (0);
if (! dev)
return grub_errno;
fs = grub_fs_probe (dev);
if (grub_errno == GRUB_ERR_UNKNOWN_FS)
grub_errno = GRUB_ERR_NONE;
grub_printf ("(%s): Filesystem is %s.\n",
grub_env_get ("root"), fs ? fs->name : "unknown");
grub_device_close (dev);
return 0;
}
/* dump ADDRESS [SIZE] */
static grub_err_t
grub_mini_cmd_dump (struct grub_command *cmd __attribute__ ((unused)),
@ -226,7 +192,7 @@ grub_mini_cmd_exit (struct grub_command *cmd __attribute__ ((unused)),
return 0;
}
static grub_command_t cmd_cat, cmd_help, cmd_root;
static grub_command_t cmd_cat, cmd_help;
static grub_command_t cmd_dump, cmd_rmmod, cmd_lsmod, cmd_exit;
GRUB_MOD_INIT(minicmd)
@ -237,9 +203,6 @@ GRUB_MOD_INIT(minicmd)
cmd_help =
grub_register_command ("help", grub_mini_cmd_help,
0, N_("Show this message."));
cmd_root =
grub_register_command ("root", grub_mini_cmd_root,
N_("[DEVICE]"), N_("Set the root device."));
cmd_dump =
grub_register_command ("dump", grub_mini_cmd_dump,
N_("ADDR"), N_("Dump memory."));
@ -258,7 +221,6 @@ GRUB_MOD_FINI(minicmd)
{
grub_unregister_command (cmd_cat);
grub_unregister_command (cmd_help);
grub_unregister_command (cmd_root);
grub_unregister_command (cmd_dump);
grub_unregister_command (cmd_rmmod);
grub_unregister_command (cmd_lsmod);