Commit c73316db authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

- 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)
parent bd3be7a9
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment