summaryrefslogtreecommitdiffstats
path: root/share/examples/kld/cdev/module/cdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'share/examples/kld/cdev/module/cdev.c')
-rw-r--r--share/examples/kld/cdev/module/cdev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/share/examples/kld/cdev/module/cdev.c b/share/examples/kld/cdev/module/cdev.c
index 8739a52..4cbbc07 100644
--- a/share/examples/kld/cdev/module/cdev.c
+++ b/share/examples/kld/cdev/module/cdev.c
@@ -68,6 +68,9 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/ioccom.h>
+#include <sys/systm.h>
+#include <sys/conf.h>
+
#include "cdev.h"
/*
@@ -109,7 +112,7 @@ mydev_ioctl(dev_t dev, u_long cmd, caddr_t arg, int mode, struct proc *procp)
int error = 0;
printf("mydev_ioctl: dev_t=%d, cmd=%lx, arg=%p, mode=%x procp=%p\n",
- dev, cmd, arg, mode, procp);
+ dev2udev(dev), cmd, arg, mode, procp);
switch(cmd) {
case CDEV_IOCTL1:
OpenPOWER on IntegriCloud