+2005-02-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.h (fhandler_base::fstat_helper): Declare with additional
+ dwVolumeSerialNumber argument. Drop default values for last three
+ arguments.
+ * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Pass
+ dwVolumeSerialNumber from GetFileInformationByHandle to fstat_helper.
+ (fhandler_base::fstat_by_name): Pass pc.volser () to fstat_helper.
+ Accomodate dropping default values for last three arguments of
+ fstat_helper.
+ (fhandler_base::fstat_helper): Add dwVolumeSerialNumber argument.
+ Use for st_dev member unless 0 in which case pc.volser () is used.
+
2005-02-20 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc (FindFirstVolumeA): Add.
virtual int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __stdcall fstat_fs (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __stdcall fstat_helper (struct __stat64 *buf,
- FILETIME ftCreateionTime,
+ FILETIME ftCreationTime,
FILETIME ftLastAccessTime,
FILETIME ftLastWriteTime,
+ DWORD dwVolumeSerialNumber,
DWORD nFileSizeHigh,
DWORD nFileSizeLow,
- DWORD nFileIndexHigh = 0,
- DWORD nFileIndexLow = 0,
- DWORD nNumberOfLinks = 1)
+ DWORD nFileIndexHigh,
+ DWORD nFileIndexLow,
+ DWORD nNumberOfLinks)
__attribute__ ((regparm (3)));
int __stdcall fstat_by_handle (struct __stat64 *buf) __attribute__ ((regparm (2)));
int __stdcall fstat_by_name (struct __stat64 *buf) __attribute__ ((regparm (2)));
local.ftCreationTime,
local.ftLastAccessTime,
local.ftLastWriteTime,
+ local.dwVolumeSerialNumber,
local.nFileSizeHigh,
local.nFileSizeLow,
local.nFileIndexHigh,
local.ftCreationTime,
local.ftLastAccessTime,
local.ftLastWriteTime,
+ pc.volser (),
local.nFileSizeHigh,
- local.nFileSizeLow);
+ local.nFileSizeLow,
+ 0,
+ 0,
+ 1);
}
else if (pc.isdir ())
{
FILETIME ft = {};
- res = fstat_helper (buf, ft, ft, ft, 0, 0);
+ res = fstat_helper (buf, ft, ft, ft, pc.volser (), 0, 0, 0, 0, 1);
}
else
{
FILETIME ftCreationTime,
FILETIME ftLastAccessTime,
FILETIME ftLastWriteTime,
+ DWORD dwVolumeSerialNumber,
DWORD nFileSizeHigh,
DWORD nFileSizeLow,
DWORD nFileIndexHigh,
to_timestruc_t (&ftLastAccessTime, &buf->st_atim);
to_timestruc_t (&ftLastWriteTime, &buf->st_mtim);
to_timestruc_t (&ftCreationTime, &buf->st_ctim);
- buf->st_dev = pc.volser ();
+ buf->st_dev = dwVolumeSerialNumber ?: pc.volser ();
buf->st_size = ((_off64_t) nFileSizeHigh << 32) + nFileSizeLow;
/* The number of links to a directory includes the
number of subdirectories in the directory, since all