* fhandler.cc (ACCFLAGS): Remove macro.

(fhandler_base::get_default_fmode): Use O_ACCMODE instead of ACCFLAGS
	and or'ed read/write flags.
	(fhandler_base::open_9x): Use O_ACCMODE instead of or'ed read/write
	flags.
	(fhandler_base::open): Ditto.
	* fhandler_disk_file.cc (fhandler_base::open_fs): Ditto.
	* fhandler_mem.cc (fhandler_dev_mem::open): Ditto.
	* fhandler_raw.cc (fhandler_dev_raw::open): Ditto.
This commit is contained in:
Corinna Vinschen
2005-12-14 16:38:22 +00:00
parent e3d14af155
commit ba31e832be
5 changed files with 27 additions and 15 deletions

View File

@@ -88,12 +88,12 @@ fhandler_dev_mem::open (int flags, mode_t)
NULL, NULL);
ACCESS_MASK section_access;
if ((flags & (O_RDONLY | O_WRONLY | O_RDWR)) == O_RDONLY)
if ((flags & O_ACCMODE) == O_RDONLY)
{
set_access (GENERIC_READ);
section_access = SECTION_MAP_READ;
}
else if ((flags & (O_RDONLY | O_WRONLY | O_RDWR)) == O_WRONLY)
else if ((flags & O_ACCMODE) == O_WRONLY)
{
set_access (GENERIC_WRITE);
section_access = SECTION_MAP_READ | SECTION_MAP_WRITE;