From 84fb3b3d73b4a1d594cb750033930db640da084a Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 12 Sep 2010 20:12:16 +0200 Subject: [PATCH] * grub-core/commands/ls.c (grub_cmd_ls): Accept multiple files. --- ChangeLog | 4 ++++ grub-core/commands/ls.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 46f430bdc..72959e665 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-09-12 Vladimir Serbinenko + + * grub-core/commands/ls.c (grub_cmd_ls): Accept multiple files. + 2010-09-12 Vladimir Serbinenko * grub-core/kern/misc.c (grub_vprintf): Use va_copy when necessary. diff --git a/grub-core/commands/ls.c b/grub-core/commands/ls.c index 02915bac4..ed8afd4ae 100644 --- a/grub-core/commands/ls.c +++ b/grub-core/commands/ls.c @@ -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; }