* grub-core/commands/ls.c (grub_cmd_ls): Accept multiple files.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-09-12 20:12:16 +02:00
parent 768ec2e2ad
commit 84fb3b3d73
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2010-09-12 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/commands/ls.c (grub_cmd_ls): Accept multiple files.
2010-09-12 Vladimir Serbinenko <phcoder@gmail.com> 2010-09-12 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/misc.c (grub_vprintf): Use va_copy when necessary. * grub-core/kern/misc.c (grub_vprintf): Use va_copy when necessary.

View file

@ -253,11 +253,13 @@ static grub_err_t
grub_cmd_ls (grub_extcmd_context_t ctxt, int argc, char **args) grub_cmd_ls (grub_extcmd_context_t ctxt, int argc, char **args)
{ {
struct grub_arg_list *state = ctxt->state; struct grub_arg_list *state = ctxt->state;
int i;
if (argc == 0) if (argc == 0)
grub_ls_list_devices (state[0].set); grub_ls_list_devices (state[0].set);
else else
grub_ls_list_files (args[0], state[0].set, state[2].set, for (i = 0; i < argc; i++)
grub_ls_list_files (args[i], state[0].set, state[2].set,
state[1].set); state[1].set);
return 0; return 0;