fat: fix listing the root directory
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 21 Jan 2022 19:15:41 +0000 (20:15 +0100)
committerFelix Zielcke <fzielcke@z-51.de>
Mon, 15 Jul 2024 15:05:20 +0000 (17:05 +0200)
commita7dc5fd09c07c6e50d7a1a3a8013d0649b95a993
tree46cb04b84d9341ec3498b61b207ba0b19aa5e8da
parent9bebfb4cecde987a902ba81f305ef3ecdc74b248
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