windows-tests-torture-20090226

LICENSE MIT

fix error message

create a file of the specified size
This commit is contained in:
Jeffrey Altman 2009-02-26 17:46:32 +00:00
parent 3c1f858208
commit ab0691760f
2 changed files with 3 additions and 3 deletions

View File

@ -386,7 +386,7 @@ BOOL run_netbench(int client, char *ClientText, char *PathToSecondDir)
printf("ERROR: You are using a dbench 1 load file\n"); printf("ERROR: You are using a dbench 1 load file\n");
if (GetHandleInformation((HANDLE)hWinEventHandle, &dwFlags)) if (GetHandleInformation((HANDLE)hWinEventHandle, &dwFlags))
break; break;
} }
if (!strcmp(params[0], "BM_SETUP")) if (!strcmp(params[0], "BM_SETUP"))
{ {
bm_state = BM_SETUP; bm_state = BM_SETUP;

View File

@ -286,7 +286,7 @@ int nb_CreateFile(char *path, DWORD size)
sprintf(FileName, "Thread_%05d.log", ProcessNumber); sprintf(FileName, "Thread_%05d.log", ProcessNumber);
if (strlen(path) == 0) if (strlen(path) == 0)
{ {
return(LeaveThread(1, "nb_DeleteFile failed no path specified\n", CMD_CREATEFILE)); return(LeaveThread(1, "nb_CreateFile failed no path specified\n", CMD_CREATEFILE));
} }
strcpy(NewPath, path); strcpy(NewPath, path);
@ -312,7 +312,7 @@ int nb_CreateFile(char *path, DWORD size)
} }
EndFirstTimer(CMD_CREATEFILE, 1); EndFirstTimer(CMD_CREATEFILE, 1);
Moved = SetFilePointer(fHandle, Moved = SetFilePointer(fHandle,
size, size - sizeof(Buffer) <= 0 ? 0 : size - sizeof(Buffer),
NULL, NULL,
FILE_BEGIN); FILE_BEGIN);
memset(Buffer, 'A', sizeof(Buffer)); memset(Buffer, 'A', sizeof(Buffer));