diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2013-08-30 17:39:11 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2013-08-30 17:39:11 +0000 |
commit | a723366660c9f9282d9c73db59e4e64ef051accb (patch) | |
tree | 166b1b29cada1659a1fb5e0536412042c9c3a6d7 /winsup | |
parent | c5abf768f9d9cacdddcecdc20b366513cbf91b8c (diff) | |
download | cygnal-a723366660c9f9282d9c73db59e4e64ef051accb.tar.gz cygnal-a723366660c9f9282d9c73db59e4e64ef051accb.tar.bz2 cygnal-a723366660c9f9282d9c73db59e4e64ef051accb.zip |
* fhandler_tape.cc (mtinfo_drive::open): Handle bus reset gracefully
after opening the device.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_tape.cc | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 976fcde2c..8c3907993 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2013-08-30 Corinna Vinschen <corinna@vinschen.de> + + * fhandler_tape.cc (mtinfo_drive::open): Handle bus reset gracefully + after opening the device. + 2013-08-30 Christopher Faylor <me.cygwin2013@cgf.cx> * sigproc.cc (pending_signals::add): Properly maintain linked list. diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc index 14f3e9d1b..eb35f6599 100644 --- a/winsup/cygwin/fhandler_tape.cc +++ b/winsup/cygwin/fhandler_tape.cc @@ -107,7 +107,10 @@ mtinfo_drive::get_mp (HANDLE mt) int mtinfo_drive::open (HANDLE mt) { - get_dp (mt); + /* First access after opening the device can return BUS RESET, but we + need the drive parameters, so just try again. */ + while (get_dp (mt) == ERROR_BUS_RESET) + ; get_mp (mt); get_pos (mt); if (partition < MAX_PARTITION_NUM && part (partition)->block != block) |