* 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

@ -84,7 +84,7 @@ fhandler_dev_raw::open (int flags, mode_t)
flags |= O_BINARY;
/* Write-only doesn't work well with raw devices */
if ((flags & (O_RDONLY | O_WRONLY | O_RDWR)) == O_WRONLY)
if ((flags & O_ACCMODE) == O_WRONLY)
flags = ((flags & ~O_WRONLY) | O_RDWR);
int res = fhandler_base::open (flags, 0);