diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-03-06 14:48:25 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-03-06 14:48:25 +0000 |
commit | 70de8290c83f19354784c85a0ed97c825a741efe (patch) | |
tree | f6c1579a023f8c9abfdbeb7bf0dd962b7dc31c5c /winsup/cygwin/fhandler_disk_file.cc | |
parent | 4e747c10dc67cab8988e50d13ffa727dd52c584d (diff) | |
download | cygnal-70de8290c83f19354784c85a0ed97c825a741efe.tar.gz cygnal-70de8290c83f19354784c85a0ed97c825a741efe.tar.bz2 cygnal-70de8290c83f19354784c85a0ed97c825a741efe.zip |
* fhandler_mailslot.cc (fhandler_mailslot::fstat): Set new stat member
st_birthtim to useful value.
* fhandler_process.cc (fhandler_process::fstat): Ditto.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Take
additional parameter for creation time. Fill st_birthtim with it.
Accomodate additional creation time parameter throughout.
* fhandler_raw.cc (fhandler_dev_raw::fstat): Set new stat member
st_birthtim to useful value.
* fhandler.cc (fhandler_base::fstat): Ditto.
* fhandler_registry.cc (fhandler_registry::fstat): Ditto.
* include/cygwin/version.h: Bump API minor number.
* include/cygwin/stat.h (struct __stat64): Replace st_spare4 with
timestruc_t st_birthtim.
(struct stat): Ditto if __CYGWIN_USE_BIG_TYPES__ is defined.
(st_birthtime): Define if __CYGWIN_USE_BIG_TYPES__ is defined.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index f40bcb52d..d510ff0f0 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -246,6 +246,7 @@ fhandler_base::fstat_by_handle (struct __stat64 *buf) *(FILETIME *) &pfai->BasicInformation.LastWriteTime, *(FILETIME *) &pfai->BasicInformation.LastAccessTime, *(FILETIME *) &pfai->BasicInformation.LastWriteTime, + *(FILETIME *) &pfai->BasicInformation.CreationTime, pfvi->VolumeSerialNumber, pfai->StandardInformation.EndOfFile.QuadPart, pfai->StandardInformation.AllocationSize.QuadPart, @@ -264,7 +265,7 @@ fhandler_base::fstat_by_handle (struct __stat64 *buf) lowfs = GetFileSize (get_handle (), &highfs); if (lowfs == 0xffffffff && GetLastError ()) lowfs = highfs = 0; - return fstat_helper (buf, ft, ft, ft, 0, (ULONGLONG) highfs << 32 | lowfs, + return fstat_helper (buf, ft, ft, ft, ft, 0, (ULONGLONG) highfs << 32 | lowfs, -1LL, 0ULL, 1, DWORD (pc)); } @@ -291,6 +292,7 @@ fhandler_base::fstat_by_name (struct __stat64 *buf) local.ftLastWriteTime, /* see fstat_helper comment */ local.ftLastAccessTime, local.ftLastWriteTime, + local.ftCreationTime, pc.volser (), (ULONGLONG) local.nFileSizeHigh << 32 | local.nFileSizeLow, @@ -302,8 +304,8 @@ fhandler_base::fstat_by_name (struct __stat64 *buf) else if (pc.isdir ()) { FILETIME ft = {}; - res = fstat_helper (buf, ft, ft, ft, pc.volser (), 0ULL, -1LL, 0ULL, 1, - FILE_ATTRIBUTE_DIRECTORY); + res = fstat_helper (buf, ft, ft, ft, ft, pc.volser (), 0ULL, -1LL, 0ULL, + 1, FILE_ATTRIBUTE_DIRECTORY); } else { @@ -379,6 +381,7 @@ fhandler_base::fstat_helper (struct __stat64 *buf, FILETIME ftChangeTime, FILETIME ftLastAccessTime, FILETIME ftLastWriteTime, + FILETIME ftCreationTime, DWORD dwVolumeSerialNumber, ULONGLONG nFileSize, LONGLONG nAllocSize, @@ -392,6 +395,7 @@ fhandler_base::fstat_helper (struct __stat64 *buf, to_timestruc_t (&ftLastAccessTime, &buf->st_atim); to_timestruc_t (&ftLastWriteTime, &buf->st_mtim); to_timestruc_t (&ftChangeTime, &buf->st_ctim); + to_timestruc_t (&ftCreationTime, &buf->st_birthtim); buf->st_dev = dwVolumeSerialNumber ?: pc.volser (); buf->st_size = (_off64_t) nFileSize; /* The number of links to a directory includes the |