mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
commands/ls: Return proper GRUB_ERR_* for functions returning type grub_err_t
Also, remove unused code. Signed-off-by: Glenn Washburn <development@efficientek.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
da9740cd52
commit
112d2069cf
1 file changed
+2
-3
@@ -250,7 +250,6 @@ grub_ls_list_files (char *dirname, int longlist, int all, int human)
|
|||||||
if (ctx.dirname == NULL)
|
if (ctx.dirname == NULL)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
all = 1;
|
|
||||||
grub_memset (&info, 0, sizeof (info));
|
grub_memset (&info, 0, sizeof (info));
|
||||||
if (longlist)
|
if (longlist)
|
||||||
print_files_long (p, &info, &ctx);
|
print_files_long (p, &info, &ctx);
|
||||||
@@ -272,7 +271,7 @@ grub_ls_list_files (char *dirname, int longlist, int all, int human)
|
|||||||
|
|
||||||
grub_free (device_name);
|
grub_free (device_name);
|
||||||
|
|
||||||
return 0;
|
return GRUB_ERR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static grub_err_t
|
static grub_err_t
|
||||||
@@ -288,7 +287,7 @@ grub_cmd_ls (grub_extcmd_context_t ctxt, int argc, char **args)
|
|||||||
grub_ls_list_files (args[i], state[0].set, state[2].set,
|
grub_ls_list_files (args[i], state[0].set, state[2].set,
|
||||||
state[1].set);
|
state[1].set);
|
||||||
|
|
||||||
return 0;
|
return GRUB_ERR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static grub_extcmd_t cmd;
|
static grub_extcmd_t cmd;
|
||||||
|
|||||||
Reference in new issue
Block a user