[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 1/6] commands/ls: Return proper GRUB_ERR_* for functions retur
From: |
Glenn Washburn |
Subject: |
[PATCH v3 1/6] commands/ls: Return proper GRUB_ERR_* for functions returning type grub_err_t |
Date: |
Sat, 4 Jan 2025 02:58:23 -0600 |
Also, remove unused code.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
grub-core/commands/ls.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/grub-core/commands/ls.c b/grub-core/commands/ls.c
index 6a1c7f5d3626..9e69b19371d5 100644
--- a/grub-core/commands/ls.c
+++ b/grub-core/commands/ls.c
@@ -246,7 +246,6 @@ grub_ls_list_files (char *dirname, int longlist, int all,
int human)
if (ctx.dirname == NULL)
goto fail;
- all = 1;
grub_memset (&info, 0, sizeof (info));
if (longlist)
print_files_long (p, &info, &ctx);
@@ -268,7 +267,7 @@ grub_ls_list_files (char *dirname, int longlist, int all,
int human)
grub_free (device_name);
- return 0;
+ return GRUB_ERR_NONE;
}
static grub_err_t
@@ -284,7 +283,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,
state[1].set);
- return 0;
+ return GRUB_ERR_NONE;
}
static grub_extcmd_t cmd;
--
2.34.1
- [PATCH v3 0/6] More ls improvements, Glenn Washburn, 2025/01/04
- [PATCH v3 1/6] commands/ls: Return proper GRUB_ERR_* for functions returning type grub_err_t,
Glenn Washburn <=
- [PATCH v3 2/6] commands/ls: Merge print_files_long and print_files into print_file, Glenn Washburn, 2025/01/04
- [PATCH v3 3/6] commands/ls: Show modification time for file paths, Glenn Washburn, 2025/01/04
- [PATCH v3 4/6] commands/ls: Output path for single file arguments given with path, Glenn Washburn, 2025/01/04
- [PATCH v3 5/6] commands/ls: Print full paths for file args, Glenn Washburn, 2025/01/04
- [PATCH v3 6/6] commands/ls: Add directory header for dir args, Glenn Washburn, 2025/01/04