- fixed copy&paste bug (GENERIC_WRITE instead of GENERIC_READ)
- when getting the type of a handle, it has to be done even if no fd is attached to it (console for example)
This commit is contained in:
parent
bd3be7a905
commit
c73316db5b
@ -219,8 +219,8 @@ int FILE_GetUnixHandleType( HANDLE handle, DWORD access, DWORD *type )
|
||||
if (!(ret = SERVER_CALL_ERR()))
|
||||
{
|
||||
fd = req->fd;
|
||||
if (type) *type = req->type;
|
||||
}
|
||||
if (type) *type = req->type;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
if (ret) return -1;
|
||||
@ -1378,7 +1378,7 @@ static BOOL FILE_ReadFileEx(HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
fd = FILE_GetUnixHandle( hFile, GENERIC_WRITE );
|
||||
fd = FILE_GetUnixHandle( hFile, GENERIC_READ );
|
||||
if(fd<0)
|
||||
{
|
||||
TRACE("Couldn't get FD\n");
|
||||
|
@ -495,6 +495,7 @@ DECL_HANDLER(get_handle_fd)
|
||||
struct object *obj;
|
||||
|
||||
req->fd = -1;
|
||||
req->type = FD_TYPE_INVALID;
|
||||
if ((obj = get_handle_obj( current->process, req->handle, req->access, NULL )))
|
||||
{
|
||||
int fd = get_handle_fd( current->process, req->handle, req->access );
|
||||
|
Loading…
x
Reference in New Issue
Block a user