* fhandler.h (fhandler_base::fstat_helper): Declare timestamps as
PLARGE_INTEGER. * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Accommodate fstat_helper change of timestamp arguments. (fhandler_base::fstat_by_name): Ditto. (fhandler_base::fstat_helper): Define with timestamps as PLARGE_INTEGER. Accommodate in call to to_timestruc_t.
This commit is contained in:
parent
7bc1f6c6c1
commit
f1817d368a
|
@ -1,3 +1,13 @@
|
||||||
|
2010-01-10 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* fhandler.h (fhandler_base::fstat_helper): Declare timestamps as
|
||||||
|
PLARGE_INTEGER.
|
||||||
|
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle):
|
||||||
|
Accommodate fstat_helper change of timestamp arguments.
|
||||||
|
(fhandler_base::fstat_by_name): Ditto.
|
||||||
|
(fhandler_base::fstat_helper): Define with timestamps as PLARGE_INTEGER.
|
||||||
|
Accommodate in call to to_timestruc_t.
|
||||||
|
|
||||||
2010-01-08 Corinna Vinschen <corinna@vinschen.de>
|
2010-01-08 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* sec_auth.cc (get_token_group_sidlist): Add BUILTIN\Users account
|
* sec_auth.cc (get_token_group_sidlist): Add BUILTIN\Users account
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* fhandler.h
|
/* fhandler.h
|
||||||
|
|
||||||
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
2005, 2006, 2007, 2008, 2009 Red Hat, Inc.
|
2005, 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
|
@ -280,10 +280,10 @@ class fhandler_base
|
||||||
virtual int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
|
virtual int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
|
||||||
int __stdcall fstat_fs (struct __stat64 *buf) __attribute__ ((regparm (2)));
|
int __stdcall fstat_fs (struct __stat64 *buf) __attribute__ ((regparm (2)));
|
||||||
int __stdcall fstat_helper (struct __stat64 *buf,
|
int __stdcall fstat_helper (struct __stat64 *buf,
|
||||||
FILETIME ftChangeTime,
|
PLARGE_INTEGER ChangeTime,
|
||||||
FILETIME ftLastAccessTime,
|
PLARGE_INTEGER LastAccessTime,
|
||||||
FILETIME ftLastWriteTime,
|
PLARGE_INTEGER LastWriteTime,
|
||||||
FILETIME ftCreationTime,
|
PLARGE_INTEGER CreationTime,
|
||||||
DWORD dwVolumeSerialNumber,
|
DWORD dwVolumeSerialNumber,
|
||||||
ULONGLONG nFileSize,
|
ULONGLONG nFileSize,
|
||||||
LONGLONG nAllocSize,
|
LONGLONG nAllocSize,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* fhandler_disk_file.cc
|
/* fhandler_disk_file.cc
|
||||||
|
|
||||||
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
2005, 2006, 2007, 2008, 2009 Red Hat, Inc.
|
2005, 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
|
@ -372,12 +372,11 @@ fhandler_base::fstat_by_handle (struct __stat64 *buf)
|
||||||
fbi.FileAttributes &= ~FILE_ATTRIBUTE_DIRECTORY;
|
fbi.FileAttributes &= ~FILE_ATTRIBUTE_DIRECTORY;
|
||||||
pc.file_attributes (fbi.FileAttributes);
|
pc.file_attributes (fbi.FileAttributes);
|
||||||
return fstat_helper (buf,
|
return fstat_helper (buf,
|
||||||
fbi.ChangeTime.QuadPart
|
fbi.ChangeTime.QuadPart ? &fbi.ChangeTime
|
||||||
? *(FILETIME *) (void *) &fbi.ChangeTime
|
: &fbi.LastWriteTime,
|
||||||
: *(FILETIME *) (void *) &fbi.LastWriteTime,
|
&fbi.LastAccessTime,
|
||||||
*(FILETIME *) (void *) &fbi.LastAccessTime,
|
&fbi.LastWriteTime,
|
||||||
*(FILETIME *) (void *) &fbi.LastWriteTime,
|
&fbi.CreationTime,
|
||||||
*(FILETIME *) (void *) &fbi.CreationTime,
|
|
||||||
get_dev (),
|
get_dev (),
|
||||||
fsi.EndOfFile.QuadPart,
|
fsi.EndOfFile.QuadPart,
|
||||||
fsi.AllocationSize.QuadPart,
|
fsi.AllocationSize.QuadPart,
|
||||||
|
@ -440,12 +439,11 @@ fhandler_base::fstat_by_name (struct __stat64 *buf)
|
||||||
fdi_buf.fdi.FileAttributes &= ~FILE_ATTRIBUTE_DIRECTORY;
|
fdi_buf.fdi.FileAttributes &= ~FILE_ATTRIBUTE_DIRECTORY;
|
||||||
pc.file_attributes (fdi_buf.fdi.FileAttributes);
|
pc.file_attributes (fdi_buf.fdi.FileAttributes);
|
||||||
return fstat_helper (buf,
|
return fstat_helper (buf,
|
||||||
fdi_buf.fdi.ChangeTime.QuadPart ?
|
fdi_buf.fdi.ChangeTime.QuadPart
|
||||||
*(FILETIME *) (void *) &fdi_buf.fdi.ChangeTime :
|
? &fdi_buf.fdi.ChangeTime : &fdi_buf.fdi.LastWriteTime,
|
||||||
*(FILETIME *) (void *) &fdi_buf.fdi.LastWriteTime,
|
&fdi_buf.fdi.LastAccessTime,
|
||||||
*(FILETIME *) (void *) &fdi_buf.fdi.LastAccessTime,
|
&fdi_buf.fdi.LastWriteTime,
|
||||||
*(FILETIME *) (void *) &fdi_buf.fdi.LastWriteTime,
|
&fdi_buf.fdi.CreationTime,
|
||||||
*(FILETIME *) (void *) &fdi_buf.fdi.CreationTime,
|
|
||||||
pc.fs_serial_number (),
|
pc.fs_serial_number (),
|
||||||
fdi_buf.fdi.EndOfFile.QuadPart,
|
fdi_buf.fdi.EndOfFile.QuadPart,
|
||||||
fdi_buf.fdi.AllocationSize.QuadPart,
|
fdi_buf.fdi.AllocationSize.QuadPart,
|
||||||
|
@ -458,10 +456,10 @@ too_bad:
|
||||||
/* Arbitrary value: 2006-12-01 */
|
/* Arbitrary value: 2006-12-01 */
|
||||||
RtlSecondsSince1970ToTime (1164931200L, &ft);
|
RtlSecondsSince1970ToTime (1164931200L, &ft);
|
||||||
return fstat_helper (buf,
|
return fstat_helper (buf,
|
||||||
*(FILETIME *) (void *) &ft,
|
&ft,
|
||||||
*(FILETIME *) (void *) &ft,
|
&ft,
|
||||||
*(FILETIME *) (void *) &ft,
|
&ft,
|
||||||
*(FILETIME *) (void *) &ft,
|
&ft,
|
||||||
0,
|
0,
|
||||||
0ULL,
|
0ULL,
|
||||||
-1LL,
|
-1LL,
|
||||||
|
@ -506,7 +504,7 @@ fhandler_base::fstat_fs (struct __stat64 *buf)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The ftChangeTime is taken from the NTFS ChangeTime entry, if reading
|
/* The ChangeTime is taken from the NTFS ChangeTime entry, if reading
|
||||||
the file information using NtQueryInformationFile succeeded. If not,
|
the file information using NtQueryInformationFile succeeded. If not,
|
||||||
it's faked using the LastWriteTime entry from GetFileInformationByHandle
|
it's faked using the LastWriteTime entry from GetFileInformationByHandle
|
||||||
or FindFirstFile. We're deliberatly not using the creation time anymore
|
or FindFirstFile. We're deliberatly not using the creation time anymore
|
||||||
|
@ -518,10 +516,10 @@ fhandler_base::fstat_fs (struct __stat64 *buf)
|
||||||
the latter might be old and not reflect the actual state of the file. */
|
the latter might be old and not reflect the actual state of the file. */
|
||||||
int __stdcall
|
int __stdcall
|
||||||
fhandler_base::fstat_helper (struct __stat64 *buf,
|
fhandler_base::fstat_helper (struct __stat64 *buf,
|
||||||
FILETIME ftChangeTime,
|
PLARGE_INTEGER ChangeTime,
|
||||||
FILETIME ftLastAccessTime,
|
PLARGE_INTEGER LastAccessTime,
|
||||||
FILETIME ftLastWriteTime,
|
PLARGE_INTEGER LastWriteTime,
|
||||||
FILETIME ftCreationTime,
|
PLARGE_INTEGER CreationTime,
|
||||||
DWORD dwVolumeSerialNumber,
|
DWORD dwVolumeSerialNumber,
|
||||||
ULONGLONG nFileSize,
|
ULONGLONG nFileSize,
|
||||||
LONGLONG nAllocSize,
|
LONGLONG nAllocSize,
|
||||||
|
@ -532,10 +530,10 @@ fhandler_base::fstat_helper (struct __stat64 *buf,
|
||||||
IO_STATUS_BLOCK st;
|
IO_STATUS_BLOCK st;
|
||||||
FILE_COMPRESSION_INFORMATION fci;
|
FILE_COMPRESSION_INFORMATION fci;
|
||||||
|
|
||||||
to_timestruc_t (&ftLastAccessTime, &buf->st_atim);
|
to_timestruc_t ((PFILETIME) LastAccessTime, &buf->st_atim);
|
||||||
to_timestruc_t (&ftLastWriteTime, &buf->st_mtim);
|
to_timestruc_t ((PFILETIME) LastWriteTime, &buf->st_mtim);
|
||||||
to_timestruc_t (&ftChangeTime, &buf->st_ctim);
|
to_timestruc_t ((PFILETIME) ChangeTime, &buf->st_ctim);
|
||||||
to_timestruc_t (&ftCreationTime, &buf->st_birthtim);
|
to_timestruc_t ((PFILETIME) CreationTime, &buf->st_birthtim);
|
||||||
buf->st_dev = dwVolumeSerialNumber;
|
buf->st_dev = dwVolumeSerialNumber;
|
||||||
buf->st_size = (_off64_t) nFileSize;
|
buf->st_size = (_off64_t) nFileSize;
|
||||||
/* The number of links to a directory includes the
|
/* The number of links to a directory includes the
|
||||||
|
|
Loading…
Reference in New Issue