* 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.
This commit is contained in:
@@ -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))
|
||||
|
Reference in New Issue
Block a user