diff options
Diffstat (limited to 'winsup/cygwin/fhandler_floppy.cc')
-rw-r--r-- | winsup/cygwin/fhandler_floppy.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler_floppy.cc b/winsup/cygwin/fhandler_floppy.cc index 3bc9f51..a8b99b2 100644 --- a/winsup/cygwin/fhandler_floppy.cc +++ b/winsup/cygwin/fhandler_floppy.cc @@ -161,9 +161,10 @@ fhandler_dev_floppy::open (int flags, mode_t) relatively big value increases performance by means. The new ioctl call with 'rdevio.h' header file supports changing this value. - Let's try to be smart: Let's take a multiple of typical tar and cpio - buffer sizes by default. */ - devbufsiz = 61440L; + As default buffer size, we're using some value which is a multiple of + the typical tar and cpio buffer sizes, Except O_DIRECT is set, in which + case we're not buffering at all. */ + devbufsiz = (flags & O_DIRECT) ? 0L : 61440L; int ret = fhandler_dev_raw::open (flags); if (ret && get_drive_info (NULL)) |