o Do not leave uninitialized birthtime: in MSDOSFSMNT_LONGNAME
set birthtime to FAT CTime (creation time) and in the other cases set birthtime to -1. o Set ctime to mtime instead of FAT CTime which has completely different meaning. PR: kern/106018 Submitted by: Oliver Fromme MFC after: 1 month
This commit is contained in:
parent
af51ff2234
commit
b3ab8f2011
@ -343,13 +343,15 @@ msdosfs_getattr(ap)
|
||||
vap->va_rdev = 0;
|
||||
vap->va_size = dep->de_FileSize;
|
||||
fattime2timespec(dep->de_MDate, dep->de_MTime, 0, 0, &vap->va_mtime);
|
||||
vap->va_ctime = vap->va_mtime;
|
||||
if (pmp->pm_flags & MSDOSFSMNT_LONGNAME) {
|
||||
fattime2timespec(dep->de_ADate, 0, 0, 0, &vap->va_atime);
|
||||
fattime2timespec(dep->de_CDate, dep->de_CTime, dep->de_CHun,
|
||||
0, &vap->va_ctime);
|
||||
0, &vap->va_birthtime);
|
||||
} else {
|
||||
vap->va_atime = vap->va_mtime;
|
||||
vap->va_ctime = vap->va_mtime;
|
||||
vap->va_birthtime.tv_sec = -1;
|
||||
vap->va_birthtime.tv_nsec = 0;
|
||||
}
|
||||
vap->va_flags = 0;
|
||||
if ((dep->de_Attributes & ATTR_ARCHIVE) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user