All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] More ls improvements
@ 2023-08-14 18:57 Glenn Washburn
  2023-08-14 18:57 ` [PATCH 1/4] disk: Reset grub_errno upon entering grub_disk_read() Glenn Washburn
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Glenn Washburn @ 2023-08-14 18:57 UTC (permalink / raw)
  To: grub-devel, Daniel Kiper; +Cc: Glenn Washburn

Currently when given a path to a file, ls will open the file to determine
if its is valid and then run the appropriate print function, in contrast to
directory arguments that use the directory iterator and callback on each
file. One issue with this is that opening a file does not allow access to
its modification time information, whereas the info object from the callback
called by the directory iterator does and the longlist print function will
print the modification time if present. The result is that when longlisting
ls arguments, directory arguments show moditication times but file arguments
do not. Patch 2 rectifies this an in the process simplifies the code path
by using the directory iterator for file arguments as well.

The implementation of patch 2 exposed a bug in grub_disk_read() which is
fixed in patch 1.

Patches 3 and 4 aim to make the output of GRUB's ls look more like GNU's
ls output. And patch 4 also fixes an issue where there are blank lines
between consecutive file arguments.

Glenn

Glenn Washburn (4):
  disk: Reset grub_errno upon entering grub_disk_read()
  commands/ls: Allow printing mtime for file arguments
  commands/ls: Add directory header for dir args and print full paths
    for file args
  commands/ls: Proper line breaks between arguments

 grub-core/commands/ls.c | 117 +++++++++++++++++++++++-----------------
 grub-core/kern/disk.c   |   2 +
 2 files changed, 71 insertions(+), 48 deletions(-)

-- 
2.34.1


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-03-01 15:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-14 18:57 [PATCH 0/4] More ls improvements Glenn Washburn
2023-08-14 18:57 ` [PATCH 1/4] disk: Reset grub_errno upon entering grub_disk_read() Glenn Washburn
2023-08-14 18:57 ` [PATCH 2/4] commands/ls: Allow printing mtime for file arguments Glenn Washburn
2023-08-14 18:57 ` [PATCH 3/4] commands/ls: Add directory header for dir args and print full paths for file args Glenn Washburn
2023-08-14 18:57 ` [PATCH 4/4] commands/ls: Proper line breaks between arguments Glenn Washburn
2023-09-14 14:44 ` [PATCH 0/4] More ls improvements Daniel Kiper
2024-02-29 20:57   ` Glenn Washburn
2024-03-01 14:39     ` Daniel Kiper
2023-09-14 15:37 ` Vladimir 'phcoder' Serbinenko
2023-09-14 20:08   ` Glenn Washburn
2023-10-06  7:25     ` Glenn Washburn
2024-03-01 15:36       ` Vladimir 'phcoder' Serbinenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.