* syscalls.cc (statvfs): Simplify path name expression.
This commit is contained in:
parent
6022cd2ef9
commit
6ca5318940
|
@ -1,3 +1,7 @@
|
||||||
|
2006-03-08 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* syscalls.cc (statvfs): Simplify path name expression.
|
||||||
|
|
||||||
2006-03-08 Corinna Vinschen <corinna@vinschen.de>
|
2006-03-08 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* syscalls.cc: Include winioctl.h.
|
* syscalls.cc: Include winioctl.h.
|
||||||
|
|
|
@ -1845,19 +1845,19 @@ statvfs (const char *fname, struct statvfs *sfs)
|
||||||
if (freec > availc)
|
if (freec > availc)
|
||||||
{
|
{
|
||||||
/* Quotas active. We can't trust totalc. */
|
/* Quotas active. We can't trust totalc. */
|
||||||
HANDLE hdl = CreateFile (full_path.get_win32 (), READ_CONTROL,
|
HANDLE hdl = CreateFile (full_path, READ_CONTROL,
|
||||||
wincap.shared (), &sec_none_nih,
|
wincap.shared (), &sec_none_nih,
|
||||||
OPEN_EXISTING,
|
OPEN_EXISTING,
|
||||||
FILE_FLAG_BACKUP_SEMANTICS, NULL);
|
FILE_FLAG_BACKUP_SEMANTICS, NULL);
|
||||||
if (hdl == INVALID_HANDLE_VALUE)
|
if (hdl == INVALID_HANDLE_VALUE)
|
||||||
debug_printf ("CreateFile (%s) failed, %E", full_path.get_win32 ());
|
debug_printf ("CreateFile (%s) failed, %E", full_path);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NTFS_VOLUME_DATA_BUFFER nvdb;
|
NTFS_VOLUME_DATA_BUFFER nvdb;
|
||||||
DWORD bytes;
|
DWORD bytes;
|
||||||
if (!DeviceIoControl (hdl, FSCTL_GET_NTFS_VOLUME_DATA, NULL,
|
if (!DeviceIoControl (hdl, FSCTL_GET_NTFS_VOLUME_DATA, NULL,
|
||||||
0, &nvdb, sizeof nvdb, &bytes, NULL))
|
0, &nvdb, sizeof nvdb, &bytes, NULL))
|
||||||
debug_printf ("DeviceIoControl (%s) failed, %E", full_path.get_win32 ());
|
debug_printf ("DeviceIoControl (%s) failed, %E", full_path);
|
||||||
else
|
else
|
||||||
totalc = nvdb.TotalClusters.QuadPart;
|
totalc = nvdb.TotalClusters.QuadPart;
|
||||||
CloseHandle (hdl);
|
CloseHandle (hdl);
|
||||||
|
|
Loading…
Reference in New Issue