From 193e7834a578ae7fccdaea2e15c895d56f6e41df Mon Sep 17 00:00:00 2001 From: Julian Elischer Date: Tue, 5 Sep 1995 05:45:34 +0000 Subject: [PATCH] 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. + */ --- sys/i386/isa/wt.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c index 87f3ae71b409..04c741633f64 100644 --- a/sys/i386/isa/wt.c +++ b/sys/i386/isa/wt.c @@ -19,10 +19,16 @@ * 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); }