mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-24 16:19:22 +00:00
mtime support for ntfs
This commit is contained in:
1 parent
7b32d83d78
commit
0e5507c411
2 files changed
+9
No files matched your search
@@ -610,6 +610,10 @@ list_file (struct grub_ntfs_file *diro, char *pos,
|
||||
|
||||
fdiro->data = diro->data;
|
||||
fdiro->ino = u32at (pos, 0);
|
||||
if (u64at (pos, 0x20) > u64at (pos, 0x28))
|
||||
fdiro->mtime = u64at (pos, 0x20);
|
||||
else
|
||||
fdiro->mtime = u64at (pos, 0x28);
|
||||
|
||||
ustr = grub_malloc (ns * 4 + 1);
|
||||
if (ustr == NULL)
|
||||
@@ -880,6 +884,10 @@ grub_ntfs_dir (grub_device_t device, const char *path,
|
||||
struct grub_dirhook_info info;
|
||||
grub_memset (&info, 0, sizeof (info));
|
||||
info.dir = ((filetype & GRUB_FSHELP_TYPE_MASK) == GRUB_FSHELP_DIR);
|
||||
info.mtimeset = 1;
|
||||
info.mtime = grub_divmod64 (node->mtime, 10000000, 0)
|
||||
- 86400ULL * 365 * (1970 - 1601)
|
||||
- 86400ULL * ((1970 - 1601) / 4) + 86400ULL * ((1970 - 1601) / 100);
|
||||
grub_free (node);
|
||||
return hook (filename, &info);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user