summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-09-24 18:16:23 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-09-24 18:16:23 +0000
commit42f9bba9782524eb4fd5e7be6bc82ce43507780c (patch)
treea46d956c3d78a5aa3e1eaef77b4328a26edad783 /sys
parent203ef99e3eaac64361f5d4e64938bb2acbb62813 (diff)
s/DEBUG/LKM_DEBUG/g
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_lkm.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c
index 121bc21ad83..144df985707 100644
--- a/sys/kern/kern_lkm.c
+++ b/sys/kern/kern_lkm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_lkm.c,v 1.17 1997/07/23 23:09:49 niklas Exp $ */
+/* $OpenBSD: kern_lkm.c,v 1.18 1997/09/24 18:16:22 mickey Exp $ */
/* $NetBSD: kern_lkm.c,v 1.31 1996/03/31 21:40:27 christos Exp $ */
/*
@@ -266,9 +266,9 @@ lkmclose(dev, flag, mode, p)
{
if (!(lkm_v & LKM_ALLOC)) {
-#ifdef DEBUG
+#ifdef LKM_DEBUG
printf("LKM: close before open!\n");
-#endif /* DEBUG */
+#endif /* LKM_DEBUG */
return (EBADF);
}
@@ -345,12 +345,12 @@ lkmioctl(dev, cmd, data, flag, p)
if (cmd == LMRESERV)
resrvp->sym_addr = 0;
}
-#ifdef DEBUG
+#ifdef LKM_DEBUG
printf("LKM: LMRESERV (actual = 0x%08lx)\n", curp->area);
printf("LKM: LMRESERV (syms = 0x%08x)\n", curp->syms);
printf("LKM: LMRESERV (adjusted = 0x%08lx)\n",
trunc_page(curp->area));
-#endif /* DEBUG */
+#endif /* LKM_DEBUG */
lkm_state = LKMS_RESERVED;
break;
@@ -378,15 +378,15 @@ lkmioctl(dev, cmd, data, flag, p)
if ((curp->offset + loadbufp->cnt) < curp->size) {
lkm_state = LKMS_LOADING;
-#ifdef DEBUG
+#ifdef LKM_DEBUG
printf("LKM: LMLOADBUF (loading @ %ld of %ld, i = %d)\n",
curp->offset, curp->size, loadbufp->cnt);
-#endif /* DEBUG */
+#endif /* LKM_DEBUG */
} else {
lkm_state = LKMS_LOADING_SYMS;
-#ifdef DEBUG
+#ifdef LKM_DEBUG
printf("LKM: LMLOADBUF (loaded)\n");
-#endif /* DEBUG */
+#endif /* LKM_DEBUG */
}
curp->offset += loadbufp->cnt;
break;
@@ -414,15 +414,15 @@ lkmioctl(dev, cmd, data, flag, p)
if ((curp->sym_offset + i) < curp->sym_size) {
lkm_state = LKMS_LOADING_SYMS;
-#ifdef DEBUG
+#ifdef LKM_DEBUG
printf( "LKM: LMLOADSYMS (loading @ %d of %d, i = %d)\n",
curp->sym_offset, curp->sym_size, i);
-#endif /* DEBUG*/
+#endif /* LKM_DEBUG*/
} else {
lkm_state = LKMS_LOADED;
-#ifdef DEBUG
+#ifdef LKM_DEBUG
printf( "LKM: LMLOADSYMS (loaded)\n");
-#endif /* DEBUG*/
+#endif /* LKM_DEBUG*/
}
curp->sym_offset += i;
break;
@@ -435,9 +435,9 @@ lkmioctl(dev, cmd, data, flag, p)
return EPERM;
lkmunreserve(); /* coerce state to LKM_IDLE */
-#ifdef DEBUG
+#ifdef LKM_DEBUG
printf("LKM: LMUNRESERV\n");
-#endif /* DEBUG */
+#endif /* LKM_DEBUG */
break;
case LMREADY: /* module loaded: call entry */
@@ -459,18 +459,18 @@ lkmioctl(dev, cmd, data, flag, p)
break;
default:
-#ifdef DEBUG
+#ifdef LKM_DEBUG
printf("lkm_state is %02x\n", lkm_state);
-#endif /* DEBUG */
+#endif /* LKM_DEBUG */
return ENXIO;
}
curp->entry = (int (*) __P((struct lkm_table *, int, int)))
(*((long *) (data)));
-#ifdef DEBUG
+#ifdef LKM_DEBUG
printf("LKM: call entrypoint %x\n", curp->entry);
-#endif
+#endif /* LKM_DEBUG */
/* call entry(load)... (assigns "private" portion) */
error = (*(curp->entry))(curp, LKM_E_LOAD, curp->ver);
if (error) {
@@ -484,9 +484,9 @@ lkmioctl(dev, cmd, data, flag, p)
break;
}
-#ifdef DEBUG
+#ifdef LKM_DEBUG
printf("LKM: LMREADY, id=%d, dev=%d\n", curp->id, curp->private.lkm_any->lkm_offset);
-#endif /* DEBUG */
+#endif /* LKM_DEBUG */
#ifdef DDB
if (curp->syms && curp->sym_offset >= curp->sym_size) {
curp->sym_id = db_add_symbol_table(curp->syms,
@@ -496,7 +496,7 @@ lkmioctl(dev, cmd, data, flag, p)
curp->syms + curp->sym_size );
printf("DDB symbols added: %ld bytes\n", curp->sym_symsize);
}
-#endif
+#endif /* DDB */
curp->refcnt++;
lkm_state = LKMS_IDLE;
break;
@@ -983,9 +983,9 @@ lkmdispatch(lkmtp, cmd)
{
int error = 0; /* default = success */
-#ifdef DEBUG
+#ifdef LKM_DEBUG
printf("lkmdispatch: %x %d\n", lkmtp, cmd);
-#endif /* DEBUG */
+#endif /* LKM_DEBUG */
switch(lkmtp->private.lkm_any->lkm_type) {
case LM_SYSCALL: