diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-10-13 16:34:18 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-10-13 16:34:18 +0400 |
commit | db8224e8be2d72a00e828a4af6db5cbd1853cebf (patch) | |
tree | b194832d0893c11dcb8dabb39279cffff002566b /winsup/cygwin/include | |
parent | 93c9cdc1b0cf91b83c31e9bc52a2e94f07a79ad5 (diff) |
* fhandler.h (class fhandler_dev_raw): Add members devbufalloc and
devbufalign.
(class fhandler_dev_floppy): Remove member bytes_per_sector;
* fhandler_floppy.cc (bytes_per_sector): Define as devbufalign.
(fhandler_dev_floppy::open): Set devbufalign to a multiple of the
sector size and handle devbuf allocation and alignment in !O_DIRECT
case here. Change comment accordingly.
Call FSCTL_ALLOW_EXTENDED_DASD_IO for partitions as well.
(fhandler_dev_floppy::raw_write): Fix comment. Rewrite and fix
writing behaviour when application uses read and lseek.
(fhandler_dev_floppy::lseek): Use rounddown macro. Call
SetFilePointerEx rather than the old SetFilePointer.
(fhandler_dev_floppy::ioctl): Reformat switch. Call
IOCTL_DISK_UPDATE_PROPERTIES rather than IOCTL_DISK_UPDATE_DRIVE_SIZE
in BLKRRPART case. Support BLKIOMIN, BLKIOOPT, BLKPBSZGET and
BLKALIGNOFF.
* fhandler_raw.cc (fhandler_dev_raw::fhandler_dev_raw): Initialize
all devbuf-related members.
(fhandler_dev_raw::~fhandler_dev_raw): Delete devbufalloc rather than
devbuf.
(fhandler_dev_raw::open): Drop allocating devbuf.
(fhandler_dev_raw::dup): Allocate devbufalloc and set devbuf to support
new sector-aligned devbuf handling.
(fhandler_dev_raw::fixup_after_exec): Ditto.
* fhandler_tape.cc (fhandler_dev_tape::open): Ditto, set devbufalign
to 1.
* include/cygwin/fs.h (BLKIOMIN): Define.
(BLKIOOPT): Define.
(BLKALIGNOFF): Define.
(BLKPBSZGET): Define.
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r-- | winsup/cygwin/include/cygwin/fs.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/winsup/cygwin/include/cygwin/fs.h b/winsup/cygwin/include/cygwin/fs.h index eb8c7e3d1..509b9c555 100644 --- a/winsup/cygwin/include/cygwin/fs.h +++ b/winsup/cygwin/include/cygwin/fs.h @@ -1,6 +1,6 @@ /* cygwin/fs.h - Copyright 2002, 2003 Red Hat Inc. + Copyright 2002, 2003, 2012 Red Hat Inc. Written by Chris January <chris@atomice.net> This file is part of Cygwin. @@ -12,9 +12,13 @@ details. */ #ifndef _CYGWIN_FS_H_ #define _CYGWIN_FS_H_ -#define BLKRRPART 0x0000125f -#define BLKGETSIZE 0x00001260 -#define BLKSSZGET 0x00001268 +#define BLKRRPART 0x0000125f +#define BLKGETSIZE 0x00001260 +#define BLKSSZGET 0x00001268 +#define BLKIOMIN 0x00001278 +#define BLKIOOPT 0x00001279 +#define BLKALIGNOFF 0x0000127a +#define BLKPBSZGET 0x0000127b #define BLKGETSIZE64 0x00041268 #endif |