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.cc15
1 files changed, 4 insertions, 11 deletions
diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc
index 48561351a..8b658924e 100644
--- a/winsup/cygwin/fhandler_tape.cc
+++ b/winsup/cygwin/fhandler_tape.cc
@@ -61,28 +61,21 @@ fhandler_dev_tape::fhandler_dev_tape (const char *name, int unit) : fhandler_dev
}
int
-fhandler_dev_tape::open (const char *path, int flags, mode_t)
+fhandler_dev_tape::open (path_conv *real_path, int flags, mode_t)
{
int ret;
- int minor;
- if (get_device_number (path, minor) != FH_TAPE)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- norewind = (minor >= 128);
+ norewind = (real_path->get_unitn () >= 128);
devbufsiz = 1L;
- ret = fhandler_dev_raw::open (path, flags);
+ ret = fhandler_dev_raw::open (real_path, flags);
if (ret)
{
struct mtget get;
struct mtop op;
struct mtpos pos;
- if (! ioctl (MTIOCGET, &get))
+ if (!ioctl (MTIOCGET, &get))
/* Tape drive supports and is set to variable block size. */
if (get.mt_dsreg == 0)
devbufsiz = get.mt_maxblksize;