* fhandler.cc (fhandler_base::open_9x): Satisfy query_open values.

This commit is contained in:
Corinna Vinschen 2005-03-04 13:54:59 +00:00
parent f317a917bc
commit 0f63e6247d
2 changed files with 23 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2005-03-04 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base::open_9x): Satisfy query_open values.
2005-03-04 Pierre Humblet <pierre.humblet@ieee.org>
* fhandler_socket.cc (fhandler_socket::ioctl): Only cancel

View File

@ -449,12 +449,25 @@ fhandler_base::open_9x (int flags, mode_t mode)
syscall_printf ("(%s, %p)", get_win32_name (), flags);
if ((flags & (O_RDONLY | O_WRONLY | O_RDWR)) == O_RDONLY)
access = GENERIC_READ;
else if ((flags & (O_RDONLY | O_WRONLY | O_RDWR)) == O_WRONLY)
access = GENERIC_WRITE;
else
access = GENERIC_READ | GENERIC_WRITE;
switch (query_open ())
{
case query_read_control:
case query_stat_control:
access = GENERIC_READ;
break;
case query_write_control:
case query_write_attributes:
access = GENERIC_READ | FILE_WRITE_ATTRIBUTES;
break;
default:
if ((flags & (O_RDONLY | O_WRONLY | O_RDWR)) == O_RDONLY)
access = GENERIC_READ;
else if ((flags & (O_RDONLY | O_WRONLY | O_RDWR)) == O_WRONLY)
access = GENERIC_WRITE;
else
access = GENERIC_READ | GENERIC_WRITE;
break;
}
if ((flags & O_TRUNC) && ((flags & O_ACCMODE) != O_RDONLY))
{