* 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>
* grub-core/kern/misc.c (grub_vprintf): Use va_copy when necessary.

View file

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