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>
Thu, 3 Jul 2025 16:35:51 +0000 (18:35 +0200)
commitafab992c2cdac5d50efb8abedb3db01425531a21
tree10328952cf505b0ada060abf4a2a4231aa6deb64
parentcf06352bd527c8424165d3f90ccd08966ea77ef5
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