[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 0/6] More ls improvements
From: |
Glenn Washburn |
Subject: |
[PATCH v4 0/6] More ls improvements |
Date: |
Mon, 6 Jan 2025 01:02:38 -0600 |
Considering Daniel's feedback on the v2 of this patch series, I've broken up
patches #1 and #2 and dropped patch #3 from the original series. These changes
make the output of the ls command a little more like the GNU ls output.
Glenn Washburn
v4: Add missing parenthesis
Glenn Washburn (6):
commands/ls: Return proper GRUB_ERR_* for functions returning type
grub_err_t
commands/ls: Merge print_files_long and print_files into print_file
commands/ls: Show modification time for file paths
commands/ls: Output path for single file arguments given with path
commands/ls: Print full paths for file args
commands/ls: Add directory header for dir args
grub-core/commands/ls.c | 93 ++++++++++++++++++++---------------------
1 file changed, 46 insertions(+), 47 deletions(-)
Range-diff against v3:
1: 9086cccd8a0f = 1: 9086cccd8a0f commands/ls: Return proper GRUB_ERR_* for
functions returning type grub_err_t
2: 3192dc2471d0 = 2: 3192dc2471d0 commands/ls: Merge print_files_long and
print_files into print_file
3: fa7adbeee4e0 ! 3: 889e1e05a355 commands/ls: Show modification time for
file paths
@@ grub-core/commands/ls.c: print_file (const char *filename, const struct
grub_dir
if ((! ctx->all) && (filename[0] == '.'))
return 0;
-+ if (ctx->filename != NULL) && (grub_strcmp (filename, ctx->filename) !=
0)
++ if ((ctx->filename != NULL) && (grub_strcmp (filename, ctx->filename)
!= 0))
+ return 0;
+
if (! ctx->longlist)
4: 5a1618235b6e = 4: d63e007f635b commands/ls: Output path for single file
arguments given with path
5: 026f37b35adb = 5: 39adcb21e320 commands/ls: Print full paths for file args
6: 5bf39d658422 ! 6: 0ebbfd3b0e15 commands/ls: Add directory header for dir
args
@@ grub-core/commands/ls.c: struct grub_ls_list_files_ctx
/* Helper for grub_ls_list_files. */
@@ grub-core/commands/ls.c: print_file (const char *filename, const struct
grub_dirhook_info *info,
- if (ctx->filename != NULL) && (grub_strcmp (filename, ctx->filename) !=
0)
+ if ((ctx->filename != NULL) && (grub_strcmp (filename, ctx->filename)
!= 0))
return 0;
+ if (ctx->print_dirhdr)
--
2.34.1
- [PATCH v4 0/6] More ls improvements,
Glenn Washburn <=
- [PATCH v4 1/6] commands/ls: Return proper GRUB_ERR_* for functions returning type grub_err_t, Glenn Washburn, 2025/01/06
- [PATCH v4 3/6] commands/ls: Show modification time for file paths, Glenn Washburn, 2025/01/06
- [PATCH v4 2/6] commands/ls: Merge print_files_long and print_files into print_file, Glenn Washburn, 2025/01/06
- [PATCH v4 4/6] commands/ls: Output path for single file arguments given with path, Glenn Washburn, 2025/01/06
- [PATCH v4 5/6] commands/ls: Print full paths for file args, Glenn Washburn, 2025/01/06
- [PATCH v4 6/6] commands/ls: Add directory header for dir args, Glenn Washburn, 2025/01/06