summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/wt.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1995-09-05 05:45:34 +0000
committerjulian <julian@FreeBSD.org>1995-09-05 05:45:34 +0000
commit0ba2ce040ddab9ea7e88b8bbad623ba9619c2aba (patch)
tree50b0c16660fdeede3037c72d3ed1a339a26a15c5 /sys/i386/isa/wt.c
parent912bdf25e65e27fab65e3d7f1bc803890346a3f5 (diff)
downloadFreeBSD-src-0ba2ce040ddab9ea7e88b8bbad623ba9619c2aba.zip
FreeBSD-src-0ba2ce040ddab9ea7e88b8bbad623ba9619c2aba.tar.gz
Submitted by: John Lind (john@starfire.mn.org)
/* + * Code for MTERASE added by John Lind (john@starfire.mn.org) 95/09/02. + * This was very easy due to the excellent structure and clear coding + * of the original driver. + */
Diffstat (limited to 'sys/i386/isa/wt.c')
-rw-r--r--sys/i386/isa/wt.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c
index 87f3ae7..04c7416 100644
--- a/sys/i386/isa/wt.c
+++ b/sys/i386/isa/wt.c
@@ -19,11 +19,17 @@
* the original CMU copyright notice.
*
* Version 1.3, Thu Nov 11 12:09:13 MSK 1993
- * $Id: wt.c,v 1.16 1995/04/12 20:48:13 wollman Exp $
+ * $Id: wt.c,v 1.17 1995/05/30 08:03:22 rgrimes Exp $
*
*/
/*
+ * Code for MTERASE added by John Lind (john@starfire.mn.org) 95/09/02.
+ * This was very easy due to the excellent structure and clear coding
+ * of the original driver.
+ */
+
+/*
* Copyright (c) 1989 Carnegie-Mellon University.
* All rights reserved.
*
@@ -488,6 +494,20 @@ int wtioctl (int dev, int cmd, void *arg, int mode)
if (error = wtwritefm (t))
return (error);
return (0);
+ case MTERASE: /* erase to EOM */
+ if (! (t->flags & TPWRITE) || (t->flags & TPWP))
+ return (EACCES);
+ if (error = wtwait (t, PCATCH, "wterase"))
+ return (error);
+ /* ERASE operations work like REWIND. */
+ /* Simulate the rewind operation here. */
+ t->flags &= ~(TPRO | TPWO | TPVOL);
+ if (! wtcmd (t, QIC_ERASE))
+ return (EIO);
+ t->flags |= TPSTART | TPREW;
+ t->flags |= TPWANY;
+ wtclock (t);
+ return (0);
}
return (EINVAL);
}
OpenPOWER on IntegriCloud