From ae9b22c69b7374129d872cde66290c925a0c9857 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 5 Feb 2001 16:10:06 +0000 Subject: * 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. --- winsup/cygwin/fhandler.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'winsup/cygwin/fhandler.cc') 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)) -- cgit v1.2.3