diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-09-28 23:02:53 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-09-28 23:02:53 +0400 |
commit | 1204c515fe00335920c5707cc136e9562fd7cf38 (patch) | |
tree | 4769da39e77da4b6be69ba926c23e75faa68af82 /winsup/cygwin/fhandler_tape.cc | |
parent | 280fdd0b67c3dbd3cee12bf6dbe363f222d98342 (diff) |
* fhandler.h (class fhandler_dev_raw): Delete current_position and
eof_detected status flag. Delete is_eom and is_eof methods.
Move drive_size, bytes_per_sector, eom_detected status flag, as well
as the methods read_file, write_file, raw_read and raw_write to ...
(class fhandler_dev_floppy): ... here. Remove is_eom and is_eof
methods. Add dup method.
* fhandler_floppy.cc (IS_EOM): New macro.
(fhandler_dev_floppy::is_eom): Remove.
(fhandler_dev_floppy::is_eof): Remove.
(fhandler_dev_floppy::fhandler_dev_floppy): Initialize status flags.
(fhandler_dev_floppy::get_drive_info): Only call EX functions on
systems supporting them and stop suffering strange delays.
(fhandler_dev_floppy::read_file): Move here, drop setting
current_position.
(fhandler_dev_floppy::write_file): Move here, drop setting
current_position.
(fhandler_dev_floppy::open): Rearrange comment.
(fhandler_dev_floppy::dup): New method.
(fhandler_dev_floppy::get_current_position): New inline method. Use
instead of former current_position were appropriate.
(fhandler_dev_floppy::raw_read): Move here. Drop EOF handling.
(fhandler_dev_floppy::raw_write): Move here. Drop EOF handling.
(fhandler_dev_floppy::lseek): Remove useless conditions. Convert
sector_aligned_offset to LARGE_INTEGER to improve SetFilePointer call.
(fhandler_dev_floppy::ioctl): Move blocksize check in RDSETBLK case
to here.
* fhandler_raw.cc (fhandler_dev_raw::is_eom): Remove.
(fhandler_dev_raw::is_eof): Remove.
(fhandler_dev_raw::write_file): Remove.
(fhandler_dev_raw::read_file): Remove.
(fhandler_dev_raw::raw_read): Remove.
(fhandler_dev_raw::raw_write): Remove.
(fhandler_dev_raw::dup): Drop copying removed members.
(fhandler_dev_raw::ioctl): Drop blocksize testing.
* wincap.h: Implement has_disk_ex_ioctls throughout.
* wincap.cc: Ditto.
(wincap_vista): Preliminary wincaps for Windows Vista/Longhorn.
(wincapc::init): Add Vista/Longhorn handling.
Diffstat (limited to 'winsup/cygwin/fhandler_tape.cc')
-rw-r--r-- | winsup/cygwin/fhandler_tape.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc index d3fd3eee2..a0ab47457 100644 --- a/winsup/cygwin/fhandler_tape.cc +++ b/winsup/cygwin/fhandler_tape.cc @@ -1442,11 +1442,11 @@ fhandler_dev_tape::fstat (struct __stat64 *buf) } int -fhandler_dev_tape::dup (fhandler_base *child) +fhandler_dev_tape::dup (fhandler_base *child, HANDLE from_proc) { lock (-1); fhandler_dev_tape *fh = (fhandler_dev_tape *) child; - if (!DuplicateHandle (hMainProc, mt_mtx, hMainProc, &fh->mt_mtx, 0, TRUE, + if (!DuplicateHandle (from_proc, mt_mtx, hMainProc, &fh->mt_mtx, 0, TRUE, DUPLICATE_SAME_ACCESS)) { debug_printf ("dup(%s) failed, mutex handle %x, %E", @@ -1456,7 +1456,7 @@ fhandler_dev_tape::dup (fhandler_base *child) } fh->mt_evt = NULL; if (mt_evt && - !DuplicateHandle (hMainProc, mt_evt, hMainProc, &fh->mt_evt, 0, TRUE, + !DuplicateHandle (from_proc, mt_evt, hMainProc, &fh->mt_evt, 0, TRUE, DUPLICATE_SAME_ACCESS)) { debug_printf ("dup(%s) failed, event handle %x, %E", @@ -1464,7 +1464,7 @@ fhandler_dev_tape::dup (fhandler_base *child) __seterrno (); return unlock (-1); } - return unlock (fhandler_dev_raw::dup (child)); + return unlock (fhandler_dev_raw::dup (child, from_proc)); } void |