* fhandler_tape.cc (mtinfo_drive::open): Handle bus reset gracefully

after opening the device.
This commit is contained in:
Corinna Vinschen 2013-08-30 17:39:11 +00:00
parent c5abf768f9
commit a723366660
2 changed files with 9 additions and 1 deletions

View File

@ -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.

View File

@ -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)