summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_tape.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_tape.cc')
-rw-r--r--winsup/cygwin/fhandler_tape.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc
index 2296d59fa..1309b3ba8 100644
--- a/winsup/cygwin/fhandler_tape.cc
+++ b/winsup/cygwin/fhandler_tape.cc
@@ -1364,6 +1364,7 @@ fhandler_dev_tape::raw_write (const void *ptr, size_t len)
if (!mt_evt && !(mt_evt = CreateEvent (&sec_none, TRUE, FALSE, NULL)))
debug_printf ("Creating event failed: %E");
int ret = mt->drive (driveno ())->write (get_handle (), mt_evt, ptr, len);
+ if (ret)
__seterrno_from_win_error (ret);
return unlock (len);
}