Move a few ancient minor-number definitions for tapedrives to the

only driver which uses them.  Remove the rest.
This commit is contained in:
Poul-Henning Kamp 2002-05-14 06:57:02 +00:00
parent 210b1d8a55
commit 22bd43ccda
3 changed files with 8 additions and 20 deletions

View File

@ -283,7 +283,7 @@ COMPAT_ISA_DRIVER(wt, wtdriver);
static int
wtopen (dev_t dev, int flag, int fmt, struct thread *td)
{
int u = minor (dev) & T_UNIT;
int u = minor (dev) & WT_UNIT;
wtinfo_t *t = wttab + u;
int error;
@ -365,7 +365,7 @@ wtopen (dev_t dev, int flag, int fmt, struct thread *td)
static int
wtclose (dev_t dev, int flags, int fmt, struct thread *td)
{
int u = minor (dev) & T_UNIT;
int u = minor (dev) & WT_UNIT;
wtinfo_t *t = wttab + u;
if (u >= NWT || t->type == UNKNOWN)
@ -377,7 +377,7 @@ wtclose (dev_t dev, int flags, int fmt, struct thread *td)
/* If seek forward is pending and no rewind on close, do nothing */
if (t->flags & TPRMARK) {
if (minor (dev) & T_NOREWIND)
if (minor (dev) & WT_NOREWIND)
goto done;
/* If read file mark is going on, wait */
@ -388,7 +388,7 @@ wtclose (dev_t dev, int flags, int fmt, struct thread *td)
/* Tape was written. Write file mark. */
wtwritefm (t);
if (! (minor (dev) & T_NOREWIND)) {
if (! (minor (dev) & WT_NOREWIND)) {
/* Rewind tape to beginning of tape. */
/* Don't wait until rewind, though. */
wtrewind (t);
@ -414,7 +414,7 @@ done:
static int
wtioctl (dev_t dev, u_long cmd, caddr_t arg, int flags, struct thread *td)
{
int u = minor (dev) & T_UNIT;
int u = minor (dev) & WT_UNIT;
wtinfo_t *t = wttab + u;
int error, count, op;
@ -512,7 +512,7 @@ wtioctl (dev_t dev, u_long cmd, caddr_t arg, int flags, struct thread *td)
static void
wtstrategy (struct bio *bp)
{
int u = minor (bp->bio_dev) & T_UNIT;
int u = minor (bp->bio_dev) & WT_UNIT;
wtinfo_t *t = wttab + u;
int s;

View File

@ -114,3 +114,5 @@
#define WT_QIC150 0040 /* 150 megabytes */
#define WT_QIC300 0050 /* 300 megabytes? */
#define WT_QIC600 0060 /* 600 megabytes? */
#define WT_UNIT 0003 /* unit selection */
#define WT_NOREWIND 0004 /* no rewind on close */

View File

@ -234,18 +234,4 @@ union mterrstat {
#define DEFTAPE "/dev/nsa0"
#endif
#ifdef _KERNEL
/*
* minor device number
*/
#define T_UNIT 003 /* unit selection */
#define T_NOREWIND 004 /* no rewind on close */
#define T_DENSEL 030 /* density select */
#define T_800BPI 000 /* select 800 bpi */
#define T_1600BPI 010 /* select 1600 bpi */
#define T_6250BPI 020 /* select 6250 bpi */
#define T_BADBPI 030 /* undefined selection */
#endif
#endif /* !_SYS_MTIO_H_ */