Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site umcp-cs.UUCP Path: utzoo!linus!decvax!ucbvax!ucdavis!lll-crg!gymble!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.unix-wizards Subject: Re: Tape drive out to lunch Message-ID: <1807@umcp-cs.UUCP> Date: Thu, 10-Oct-85 23:48:22 EDT Article-I.D.: umcp-cs.1807 Posted: Thu Oct 10 23:48:22 1985 Date-Received: Sat, 12-Oct-85 08:04:01 EDT References: <2018@brl-tgr.ARPA> Organization: U of Maryland, Computer Science Dept., College Park, MD Lines: 53 > ... Any "mt" commands met with: > /dev/rmt12: No such device or address This generally happens when someone else has the drive open. It also occasionally happens when no one else has the drive open, but the kernel believes otherwise. I prefer kernels fixed so that "mt" says: /dev/rmt12: Mount device busy While not perfect, this is unarguably better than "No such device or address". The required change is trivial. Here is the one for the 4.2/4.3 TS11 driver. Your line numbers will vary. *** /tmp/,RCSt1005062 Thu Oct 10 23:46:25 1985 --- ts.c Thu Oct 3 23:15:34 1985 *************** *** 180,185 tsunit = TSUNIT(dev); ! if (tsunit>=NTS || (sc = &ts_softc[tsunit])->sc_openf || ! (ui = tsdinfo[tsunit]) == 0 || ui->ui_alive == 0) return (ENXIO); if (tsinit(tsunit)) --- 196,200 ----- tsunit = TSUNIT(dev); ! if (tsunit >= NTS || (ui = tsdinfo[tsunit]) == 0 || ui->ui_alive == 0) return (ENXIO); sc = &ts_softc[tsunit]; *************** *** 183,186 (ui = tsdinfo[tsunit]) == 0 || ui->ui_alive == 0) return (ENXIO); if (tsinit(tsunit)) return (ENXIO); --- 198,204 ----- if (tsunit >= NTS || (ui = tsdinfo[tsunit]) == 0 || ui->ui_alive == 0) return (ENXIO); + sc = &ts_softc[tsunit]; + if (sc->sc_openf) + return (EBUSY); if (tsinit(tsunit)) return (ENXIO); -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@mimsy.umd.edu