diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-02-05 16:10:06 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-02-05 16:10:06 +0000 |
commit | ae9b22c69b7374129d872cde66290c925a0c9857 (patch) | |
tree | cca1713686b18ff588f7c3a7f8ef8409aea86aeb /winsup/cygwin/fhandler.cc | |
parent | cada03f92f6d9f2126ab8dd094a740bdeb673103 (diff) | |
download | cygnal-ae9b22c69b7374129d872cde66290c925a0c9857.tar.gz cygnal-ae9b22c69b7374129d872cde66290c925a0c9857.tar.bz2 cygnal-ae9b22c69b7374129d872cde66290c925a0c9857.zip |
* fhandler.cc (fhandler_base::open): Always add GENERIC_READ access
when opening raw disk devices.
* fhandler_floppy.cc (fhandler_dev_floppy::lseek): Implement bytewise
access.
* fhandler_raw.cc (fhandler_dev_raw::open): Always open raw disk device
binary.
(fhandler_dev_raw::raw_write): Don't drop read buffer content when
writing after read.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r-- | winsup/cygwin/fhandler.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index f6779614a..1c9e600a8 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -324,6 +324,12 @@ fhandler_base::open (int flags, mode_t mode) access_ = GENERIC_READ | GENERIC_WRITE; } + /* Allow reliable lseek on disk devices. */ + if (get_device () == FH_FLOPPY) + { + access_ |= GENERIC_READ; + } + /* FIXME: O_EXCL handling? */ if ((flags & O_TRUNC) && ((flags & O_ACCMODE) != O_RDONLY)) |