summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksandr Rybalko <ray@FreeBSD.org>2014-05-08 22:52:05 +0000
committerAleksandr Rybalko <ray@FreeBSD.org>2014-05-08 22:52:05 +0000
commit16aa1f0950a3b4407a36ecc96acc8ca0710ebd91 (patch)
treebd41c0810871a14568fef6d6042823e5760cf2eb
parent02e843636ab44cfd424d82c5e26399b5a72c8ab3 (diff)
downloadsrc-test-16aa1f0950a3b4407a36ecc96acc8ca0710ebd91.tar.gz
src-test-16aa1f0950a3b4407a36ecc96acc8ca0710ebd91.zip
Notes
-rw-r--r--sys/dev/vt/vt.h6
-rw-r--r--sys/dev/vt/vt_consolectl.c2
-rw-r--r--sys/dev/vt/vt_sysmouse.c2
3 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h
index 66d05c2a1afdd..eb0ce1fab7f85 100644
--- a/sys/dev/vt/vt.h
+++ b/sys/dev/vt/vt.h
@@ -78,7 +78,13 @@ one 'device sc' or 'device vt'"
#endif /* defined(SC_TWOBUTTON_MOUSE) || defined(VT_TWOBUTTON_MOUSE) */
#define SC_DRIVER_NAME "vt"
+#ifdef VT_DEBUG
#define DPRINTF(_l, ...) if (vt_debug > (_l)) printf( __VA_ARGS__ )
+#define VT_CONSOLECTL_DEBUG
+#define VT_SYSMOUSE_DEBUG
+#else
+#define DPRINTF(_l, ...) do {} while (0)
+#endif
#define ISSIGVALID(sig) ((sig) > 0 && (sig) < NSIG)
#define VT_SYSCTL_INT(_name, _default, _descr) \
diff --git a/sys/dev/vt/vt_consolectl.c b/sys/dev/vt/vt_consolectl.c
index f9c451780fc77..df8b341d41323 100644
--- a/sys/dev/vt/vt_consolectl.c
+++ b/sys/dev/vt/vt_consolectl.c
@@ -61,8 +61,10 @@ consolectl_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag,
return (0);
}
default:
+#ifdef VT_CONSOLECTL_DEBUG
printf("consolectl: unknown ioctl: %c:%lx\n",
(char)IOCGROUP(cmd), IOCBASECMD(cmd));
+#endif
return (ENOIOCTL);
}
}
diff --git a/sys/dev/vt/vt_sysmouse.c b/sys/dev/vt/vt_sysmouse.c
index 73ef39d735f23..92eee3c4b8c12 100644
--- a/sys/dev/vt/vt_sysmouse.c
+++ b/sys/dev/vt/vt_sysmouse.c
@@ -376,8 +376,10 @@ sysmouse_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag,
case MOUSE_MOUSECHAR:
return (0);
default:
+#ifdef VT_SYSMOUSE_DEBUG
printf("sysmouse: unknown ioctl: %c:%lx\n",
(char)IOCGROUP(cmd), IOCBASECMD(cmd));
+#endif
return (ENOIOCTL);
}
}