mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 09:10:53 +00:00
fs: Use 64-bit type for filesystem timestamp
Some filesystems nowadays use 64-bit types for timestamps. So, update grub_dirhook_info struct to use an grub_int64_t type to store mtime. This also updates the grub_unixtime2datetime() function to receive a 64-bit timestamp argument and do 64-bit-safe divisions. All the remaining conversion from 32-bit to 64-bit should be safe, as 32-bit to 64-bit attributions will be implicitly casted. The most critical part in the 32-bit to 64-bit conversion is in the function grub_unixtime2datetime() where it needs to deal with the 64-bit type. So, for that, the grub_divmod64() helper has been used. These changes enables the GRUB to support dates beyond y2038. Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
af54062b54
commit
81f1962393
16 files changed
+32
-25
No files matched your search
@@ -1003,7 +1003,7 @@ grub_squash_close (grub_file_t file)
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_squash_mtime (grub_device_t dev, grub_int32_t *tm)
|
||||
grub_squash_mtime (grub_device_t dev, grub_int64_t *tm)
|
||||
{
|
||||
struct grub_squash_data *data = 0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user