mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 18:14:24 +08:00
ntfs-3g.c: Fix raw usage of inode time fields without byteswapping.
This commit is contained in:
parent
701cd61cca
commit
02ce4947df
@ -568,7 +568,7 @@ static int ntfs_macfuse_getxtimes(const char *org_path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* We have no backup timestamp in NTFS. */
|
/* We have no backup timestamp in NTFS. */
|
||||||
crtime->tv_sec = ni->creation_time;
|
crtime->tv_sec = sle64_to_cpu(ni->creation_time);
|
||||||
exit:
|
exit:
|
||||||
if (ntfs_inode_close(ni))
|
if (ntfs_inode_close(ni))
|
||||||
set_fuse_error(&res);
|
set_fuse_error(&res);
|
||||||
@ -590,7 +590,7 @@ int ntfs_macfuse_setcrtime(const char *path, const struct timespec *tv)
|
|||||||
return -errno;
|
return -errno;
|
||||||
|
|
||||||
if (tv) {
|
if (tv) {
|
||||||
ni->creation_time = tv->tv_sec;
|
ni->creation_time = cpu_to_sle64(tv->tv_sec);
|
||||||
ntfs_fuse_update_times(ni, NTFS_UPDATE_CTIME);
|
ntfs_fuse_update_times(ni, NTFS_UPDATE_CTIME);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -632,7 +632,7 @@ int ntfs_macfuse_setchgtime(const char *path, const struct timespec *tv)
|
|||||||
return -errno;
|
return -errno;
|
||||||
|
|
||||||
if (tv) {
|
if (tv) {
|
||||||
ni->last_mft_change_time = tv->tv_sec;
|
ni->last_mft_change_time = cpu_to_sle64(tv->tv_sec);
|
||||||
ntfs_fuse_update_times(ni, 0);
|
ntfs_fuse_update_times(ni, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user