fat: fix listing the root directory
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 21 Jan 2022 19:15:41 +0000 (20:15 +0100)
committerPeter Michael Green <plugwash@raspbian.org>
Sun, 28 Jul 2024 22:42:11 +0000 (22:42 +0000)
commit25f636d09ab3e3ec9656220ed850c5071b9eefc2
treea5495aea5e1a503221c274d970af0dc11225b0c4
parent5c9555b71202df578e1096b0fcbeab514509262c
fat: fix listing the root directory

ls / for a FAT partition leads to

   error: invalid modification timestamp for /.

Not all entries of the directory are displayed.

Linux never updates the modification timestamp of the /. directory entry.
The FAT specification allows the access and creation date fields to be
zero.

We should follow Linux and render initial FAT timestamps as start of
the epoch.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Origin: https://lists.gnu.org/archive/html/grub-devel/2022-01/msg00116.html

Gbp-Pq: Name fat-fix-listing-the-root-directory.patch
grub-core/fs/fat.c