From 670d8ef0164591b7af83c9f89808a63eeba2297a Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 16 May 2000 21:42:55 +0000 Subject: [PATCH] * fhandler_tape.cc (fhandler_dev_tape::ioctl): Check for filemark feature on MTWEOF operation. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/fhandler_tape.cc | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 1ede3cda1..24500a1ce 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +Tue May 16 23:39:00 2000 Corinna Vinschen + + Patch suggested by John Rowley + * fhandler_tape.cc (fhandler_dev_tape::ioctl): Check + for filemark feature on MTWEOF operation. + Tue May 16 11:49:13 2000 Christopher Faylor * include/cygwin/in.h (AF_INET6): Use correct in6_addr struct. diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc index 7b25e9f4b..e6e2b4c18 100644 --- a/winsup/cygwin/fhandler_tape.cc +++ b/winsup/cygwin/fhandler_tape.cc @@ -263,7 +263,12 @@ fhandler_dev_tape::ioctl (unsigned int cmd, void *buf) ret = tape_set_pos (TAPE_SPACE_RELATIVE_BLOCKS, -op->mt_count); break; case MTWEOF: - ret = tape_write_marks (TAPE_FILEMARKS, op->mt_count); + if (tape_get_feature (TAPE_DRIVE_WRITE_FILEMARKS)) + ret = tape_write_marks (TAPE_FILEMARKS, op->mt_count); + else if (tape_get_feature (TAPE_DRIVE_WRITE_LONG_FMKS)) + ret = tape_write_marks (TAPE_LONG_FILEMARKS, op->mt_count); + else + ret = tape_write_marks (TAPE_SHORT_FILEMARKS, op->mt_count); break; case MTREW: ret = tape_set_pos (TAPE_REWIND, 0);