grub2/grub-core/tests
Carlos Maiolino 81f1962393 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>
2021-06-01 17:19:13 +02:00
..
boot kernel-8086: Switch to more portable .org. 2015-02-21 20:24:59 +01:00
lib strtoull: Fix behaviour on chars between '9' and 'a'. 2017-05-03 12:59:58 +02:00
bswap_test.c Remove libgcc dependency. 2015-03-03 20:50:37 +01:00
checksums.h Regenerate checksum.h with newer unifont. 2017-08-30 17:12:04 +02:00
cmdline_cat_test.c core: use GRUB_TERM_ definitions when handling term characters 2017-08-07 19:28:22 +02:00
cmp_test.c Remove libgcc dependency. 2015-03-03 20:50:37 +01:00
ctz_test.c Remove libgcc dependency. 2015-03-03 20:50:37 +01:00
div_test.c Supply signed division to fix ARM compilation. 2015-02-23 04:12:04 +01:00
example_functional_test.c The old code gives arguments to a printf function which can't work 2012-05-27 14:26:18 +02:00
fake_input.c calloc: Use calloc() at most places 2020-07-29 16:55:47 +02:00
gfxterm_menu.c core: use GRUB_TERM_ definitions when handling term characters 2017-08-07 19:28:22 +02:00
legacy_password_test.c * grub-core/tests/legacy_password_test.c (vectors): Make static. 2013-11-12 15:59:58 +01:00
mul_test.c Remove libgcc dependency. 2015-03-03 20:50:37 +01:00
pbkdf2_test.c * grub-core/tests/legacy_password_test.c (vectors): Make static. 2013-11-12 15:59:58 +01:00
setjmp_test.c i386, x86_64, ppc: fix switch fallthrough cases with GCC7 2017-04-04 19:23:55 +03:00
shift_test.c Remove libgcc dependency. 2015-03-03 20:50:37 +01:00
signature_test.c * grub-core/tests/signature_test.c: New test. 2013-11-12 16:05:57 +01:00
signatures.h * grub-core/tests/signature_test.c: New test. 2013-11-12 16:05:57 +01:00
sleep_test.c fs: Use 64-bit type for filesystem timestamp 2021-06-01 17:19:13 +02:00
strtoull_test.c misc: Make grub_strtol() "end" pointers have safer const qualifiers 2020-02-28 12:41:29 +01:00
test_blockarg.c * grub-core/commands/acpi.c: Add TRANSLATORS comments. 2012-03-06 14:11:10 +01:00
video_checksum.c calloc: Use calloc() at most places 2020-07-29 16:55:47 +02:00
videotest_checksum.c * grub-core/tests/videotest_checksum.c: Don't reload unifont if it's 2013-11-18 14:38:31 +01:00
xnu_uuid_test.c * grub-core/tests/xnu_uuid_test.c: Fix assert message. 2013-11-12 14:11:34 +01:00