mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 22:20:26 +00:00
Call VIRTUAL_HandleFault if read/write returns EFAULT.
This commit is contained in:
parent
4bd7128f09
commit
b7b205046f
@ -1147,6 +1147,7 @@ BOOL32 WINAPI ReadFile( HANDLE32 hFile, LPVOID buffer, DWORD bytesToRead,
|
|||||||
while ((result = read( unix_handle, buffer, bytesToRead )) == -1)
|
while ((result = read( unix_handle, buffer, bytesToRead )) == -1)
|
||||||
{
|
{
|
||||||
if ((errno == EAGAIN) || (errno == EINTR)) continue;
|
if ((errno == EAGAIN) || (errno == EINTR)) continue;
|
||||||
|
if ((errno == EFAULT) && VIRTUAL_HandleFault( buffer )) continue;
|
||||||
FILE_SetDosError();
|
FILE_SetDosError();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1180,6 +1181,7 @@ BOOL32 WINAPI WriteFile( HANDLE32 hFile, LPCVOID buffer, DWORD bytesToWrite,
|
|||||||
while ((result = write( unix_handle, buffer, bytesToWrite )) == -1)
|
while ((result = write( unix_handle, buffer, bytesToWrite )) == -1)
|
||||||
{
|
{
|
||||||
if ((errno == EAGAIN) || (errno == EINTR)) continue;
|
if ((errno == EAGAIN) || (errno == EINTR)) continue;
|
||||||
|
if ((errno == EFAULT) && VIRTUAL_HandleFault( buffer )) continue;
|
||||||
FILE_SetDosError();
|
FILE_SetDosError();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user