* syscalls.cc (gethostid): Add lpFreeBytesAvailable argument to

GetDiskFreeSpaceEx call since NT4 requires it.
This commit is contained in:
Christopher Faylor 2003-09-17 21:47:12 +00:00
parent cb16ce2c2e
commit f7f542063b
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-09-16 Brian Ford <ford@vss.fsi.com>
* syscalls.cc (gethostid): Add lpFreeBytesAvailable argument to
GetDiskFreeSpaceEx call since NT4 requires it.
2003-09-16 Christopher Faylor <cgf@redhat.com>
* fhandler_process.cc (fhandler_process::fill_filebuf): Open pinfo with

View File

@ -2884,7 +2884,10 @@ long gethostid(void)
key.get_string ("ProductId", (char *)&data[6], 24, "00000-000-0000000-00000");
debug_printf ("Windows Product ID: %s", (char *)&data[6]);
GetDiskFreeSpaceEx ("C:\\", NULL, (PULARGE_INTEGER) &data[11], NULL);
/* Contrary to MSDN, NT4 requires the second argument
or a STATUS_ACCESS_VIOLATION is generated */
ULARGE_INTEGER availb;
GetDiskFreeSpaceEx ("C:\\", &availb, (PULARGE_INTEGER) &data[11], NULL);
if (GetLastError () == ERROR_PROC_NOT_FOUND)
GetDiskFreeSpace ("C:\\", NULL, NULL, NULL, (DWORD *)&data[11]);