From 0c8731b8f43ff50700432767b34e67a11a713bff Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 19 Apr 2004 19:29:10 +0000 Subject: * errno.cc (errmap): Handle ERROR_IO_PENDING. * fhandler.cc (fhandler_base::open): Make tape I/O asynchronous. * fhandler.h (class fhandler_dev_tape): Add mt_evt member. * fhandler_tape.cc (mtinfo_drive::initialize): Initialize async_writes. (mtinfo_drive::close): Handle async writes. (mtinfo_drive::read): Add mt_evt parameter. Use overlapped I/O. (mtinfo_drive::async_wait): New function. (mtinfo_drive::write): Add mt_evt parameter. Use overlapped I/O. Handle async writes. (mtinfo_drive::_set_pos): Handle async writes. (mtinfo_drive::set_partition): Ditto. (mtinfo_drive::prepare): Ditto. (mtinfo_drive::get_status): Drop useless "else". Handle async_writes flag. (mtinfo_drive::set_options): Handle async_writes flags. (fhandler_dev_tape::close): Close mt_evt handle. (fhandler_dev_tape::raw_read): Create mt_evt handle and use in call to mtinfo_drive::read. (fhandler_dev_tape::raw_write): Create mt_evt handle and use in call to mtinfo_drive::write. * mtinfo.h (MTINFO_VERSION): Bump. (enum dirty_state): Add async_write_pending state. (class mtinfo_drive): Add OVERLAPPED struct "ov". Add async_writes flag. (mtinfo_drive::async_wait): Add declaration. (mtinfo_drive::read): Add mt_evt parameter. (mtinfo_drive::write): Ditto. * registry.cc (load_registry_hive): Call enable_restore_privilege instead of set_process_privilege. --- winsup/cygwin/fhandler.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/fhandler.cc') diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index f1dfed8c4..a3ef1bb32 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -610,7 +610,8 @@ fhandler_base::open (int flags, mode_t mode) /* Allow reliable lseek on disk devices. */ if (get_major () == DEV_FLOPPY_MAJOR) access |= GENERIC_READ; - else if (get_major () != DEV_SERIAL_MAJOR) + else if (get_major () != DEV_SERIAL_MAJOR + && get_major () != DEV_TAPE_MAJOR) { create_options |= FILE_SYNCHRONOUS_IO_NONALERT; access |= SYNCHRONIZE; -- cgit v1.2.3