diff options
author | bde <bde@FreeBSD.org> | 1995-12-22 15:39:45 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-12-22 15:39:45 +0000 |
commit | 21be36c769fe438ab27f0e577d82c2c5b7a6fb61 (patch) | |
tree | 3845317c7d4c5f441697689c31a228480fbc29b6 /sys | |
parent | bc17df0725c0256cd32f5c43819dbc0348be2162 (diff) | |
download | FreeBSD-src-21be36c769fe438ab27f0e577d82c2c5b7a6fb61.zip FreeBSD-src-21be36c769fe438ab27f0e577d82c2c5b7a6fb61.tar.gz |
Renamed private DEBUG macro to avoid warnings when DEBUG is an option.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/i386/isa/asc.c | 18 | ||||
-rw-r--r-- | sys/i386/isa/gsc.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/wt.c | 32 |
3 files changed, 26 insertions, 26 deletions
diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c index f075808..4b89e9b 100644 --- a/sys/i386/isa/asc.c +++ b/sys/i386/isa/asc.c @@ -34,7 +34,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* - * $Id: asc.c,v 1.12 1995/12/15 00:29:27 bde Exp $ + * $Id: asc.c,v 1.13 1995/12/16 21:32:19 bde Exp $ */ #include "asc.h" @@ -165,7 +165,7 @@ struct asc_unit { #define SLEEPING 0x10 #define SEL_COLL 0x20 #define PBM_MODE 0x40 -#define DEBUG 0x80 +#define FLAG_DEBUG 0x80 int geometry; /* resolution as geomtab index */ int linesize; /* length of one scan line (from geom.table) */ int blen; /* length of buffer in lines */ @@ -394,7 +394,7 @@ ascprobe (struct isa_device *isdp) int stb; scu->base = isdp->id_iobase; /*** needed by the following macros ***/ - scu->flags = DEBUG; + scu->flags = FLAG_DEBUG; if ( isdp->id_iobase < 0 ) { lprintf("asc%d.probe: no iobase given\n", unit); @@ -444,7 +444,7 @@ ascprobe (struct isa_device *isdp) asc_reset(scu); /* lprintf("asc%d.probe: ok\n", unit); */ - scu->flags &= ~DEBUG; + scu->flags &= ~FLAG_DEBUG; scu->icnt = 0; return PROBE_SUCCESS; } @@ -464,7 +464,7 @@ ascattach(struct isa_device *isdp) char name[32]; #endif - scu->flags |= DEBUG; + scu->flags |= FLAG_DEBUG; printf("asc%d: [GI1904/Trust Ami-Scan Grey, type S2]\n", unit); /* initialize buffer structure */ @@ -474,7 +474,7 @@ ascattach(struct isa_device *isdp) scu->flags |= ATTACHED; /* lprintf("asc%d.attach: ok\n", unit); */ - scu->flags &= ~DEBUG; + scu->flags &= ~FLAG_DEBUG; #ifdef FREEBSD_1_X scu->selp = (pid_t)0; @@ -585,7 +585,7 @@ ascopen(dev_t dev, int flags, int fmt, struct proc *p) } scu->flags = ATTACHED | OPEN; - if ( minor(dev) & DBUG_MASK ) scu->flags |= DEBUG; + if ( minor(dev) & DBUG_MASK ) scu->flags |= FLAG_DEBUG; switch(minor(dev) & FRMT_MASK) { case FRMT_PBM: @@ -671,7 +671,7 @@ ascclose(dev_t dev, int flags, int fmt, struct proc *p) scu->sbuf.size = INVALID; scu->sbuf.rptr = INVALID; - scu->flags &= ~(DEBUG | OPEN | READING); + scu->flags &= ~(FLAG_DEBUG | OPEN | READING); return SUCCESS; } @@ -739,7 +739,7 @@ ascread(dev_t dev, struct uio *uio, int ioflag) if ( res == 0 ) res = SUCCESS; } splx(sps); /* lower priority... */ - if (scu->flags & DEBUG) + if (scu->flags & FLAG_DEBUG) tsleep((caddr_t)scu, ASCPRI | PCATCH, "ascdly",hz); lprintf("asc%d.read(after): " "sz 0x%x, rptr 0x%x, wptr 0x%x, cnt 0x%x bcnt 0x%x flags 0x%x icnt %d\n", diff --git a/sys/i386/isa/gsc.c b/sys/i386/isa/gsc.c index df2231c..49ed9f2 100644 --- a/sys/i386/isa/gsc.c +++ b/sys/i386/isa/gsc.c @@ -145,7 +145,7 @@ struct gsc_unit { #define OPEN 0x02 #define READING 0x04 #define EOF 0x08 -#define DEBUG 0x10 +#define FLAG_DEBUG 0x10 #define PBM_MODE 0x20 int geometry; /* resolution as geomtab index */ int blen; /* length of buffer in lines */ diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c index 93aaf1f..a1f2c70 100644 --- a/sys/i386/isa/wt.c +++ b/sys/i386/isa/wt.c @@ -19,7 +19,7 @@ * the original CMU copyright notice. * * Version 1.3, Thu Nov 11 12:09:13 MSK 1993 - * $Id: wt.c,v 1.25 1995/12/08 23:20:54 phk Exp $ + * $Id: wt.c,v 1.26 1995/12/10 13:39:27 phk Exp $ * */ @@ -84,7 +84,7 @@ /* * Uncomment this to enable internal device tracing. */ -#define DEBUG(s) /* printf s */ +#define TRACE(s) /* printf s */ #define WTPRI (PZERO+10) /* sleep priority */ @@ -636,14 +636,14 @@ void wtintr (int u) unsigned char s; if (u >= NWT || t->type == UNKNOWN) { - DEBUG (("wtintr() -- device not configured\n")); + TRACE (("wtintr() -- device not configured\n")); return; } s = inb (t->STATPORT); /* get status */ - DEBUG (("wtintr() status=0x%x -- ", s)); + TRACE (("wtintr() status=0x%x -- ", s)); if ((s & (t->BUSY | t->NOEXCEP)) == (t->BUSY | t->NOEXCEP)) { - DEBUG (("busy\n")); + TRACE (("busy\n")); return; /* device is busy */ } @@ -651,7 +651,7 @@ void wtintr (int u) * Check if rewind finished. */ if (t->flags & TPREW) { - DEBUG (((s & (t->BUSY | t->NOEXCEP)) == (t->BUSY | t->NOEXCEP) ? + TRACE (((s & (t->BUSY | t->NOEXCEP)) == (t->BUSY | t->NOEXCEP) ? "rewind busy?\n" : "rewind finished\n")); t->flags &= ~TPREW; /* Rewind finished. */ wtsense (t, 1, TP_WRP); @@ -663,7 +663,7 @@ void wtintr (int u) * Check if writing/reading of file mark finished. */ if (t->flags & (TPRMARK | TPWMARK)) { - DEBUG (((s & (t->BUSY | t->NOEXCEP)) == (t->BUSY | t->NOEXCEP) ? + TRACE (((s & (t->BUSY | t->NOEXCEP)) == (t->BUSY | t->NOEXCEP) ? "marker r/w busy?\n" : "marker r/w finished\n")); if (! (s & t->NOEXCEP)) /* operation failed */ wtsense (t, 1, (t->flags & TPRMARK) ? TP_WRP : 0); @@ -676,7 +676,7 @@ void wtintr (int u) * Do we started any i/o? If no, just return. */ if (! (t->flags & TPACTIVE)) { - DEBUG (("unexpected interrupt\n")); + TRACE (("unexpected interrupt\n")); return; } t->flags &= ~TPACTIVE; @@ -697,7 +697,7 @@ void wtintr (int u) * On exception, check for end of file and end of volume. */ if (! (s & t->NOEXCEP)) { - DEBUG (("i/o exception\n")); + TRACE (("i/o exception\n")); wtsense (t, 1, (t->dmaflags & B_READ) ? TP_WRP : 0); if (t->error.err & (TP_EOM | TP_FIL)) t->flags |= TPVOL; /* end of file */ @@ -710,13 +710,13 @@ void wtintr (int u) if (t->dmacount < t->dmatotal) { /* continue i/o */ t->dmavaddr += t->bsize; wtdma (t); - DEBUG (("continue i/o, %d\n", t->dmacount)); + TRACE (("continue i/o, %d\n", t->dmacount)); return; } if (t->dmacount > t->dmatotal) /* short last block */ t->dmacount = t->dmatotal; wakeup ((caddr_t)t); /* wake up user level */ - DEBUG (("i/o finished, %d\n", t->dmacount)); + TRACE (("i/o finished, %d\n", t->dmacount)); } /* start the rewind operation */ @@ -798,7 +798,7 @@ static int wtcmd (wtinfo_t *t, int cmd) { int s, x; - DEBUG (("wtcmd() cmd=0x%x\n", cmd)); + TRACE (("wtcmd() cmd=0x%x\n", cmd)); x = splbio(); s = wtpoll (t, t->BUSY | t->NOEXCEP, t->BUSY | t->NOEXCEP); /* ready? */ if (! (s & t->NOEXCEP)) { /* error */ @@ -821,7 +821,7 @@ static int wtwait (wtinfo_t *t, int catch, char *msg) { int error; - DEBUG (("wtwait() `%s'\n", msg)); + TRACE (("wtwait() `%s'\n", msg)); while (t->flags & (TPACTIVE | TPREW | TPRMARK | TPWMARK)) if (error = tsleep ((caddr_t)t, WTPRI | catch, msg, 0)) return (error); @@ -849,7 +849,7 @@ static int wtstart (wtinfo_t *t, unsigned flags, void *vaddr, unsigned len) { int s, x; - DEBUG (("wtstart()\n")); + TRACE (("wtstart()\n")); x = splbio(); s = wtpoll (t, t->BUSY | t->NOEXCEP, t->BUSY | t->NOEXCEP); /* ready? */ if (! (s & t->NOEXCEP)) { @@ -895,7 +895,7 @@ static void wtimer (void *xt) /* If i/o going, simulate interrupt. */ s = splbio (); if ((inb (t->STATPORT) & (t->BUSY | t->NOEXCEP)) != (t->BUSY | t->NOEXCEP)) { - DEBUG (("wtimer() -- ")); + TRACE (("wtimer() -- ")); wtintr (t->unit); } splx (s); @@ -939,7 +939,7 @@ static int wtsense (wtinfo_t *t, int verb, int ignor) char *msg = 0; int err; - DEBUG (("wtsense() ignor=0x%x\n", ignor)); + TRACE (("wtsense() ignor=0x%x\n", ignor)); t->flags &= ~(TPRO | TPWO); if (! wtstatus (t)) return (0); |