summaryrefslogtreecommitdiffstats
path: root/share/examples/kld/cdev/module/cdev.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1999-06-27 12:44:44 +0000
committerdfr <dfr@FreeBSD.org>1999-06-27 12:44:44 +0000
commit633d8b5f5a152bf3fdda8daf986ec47105ae879b (patch)
treeecbd2f08cc1b76af7b0b0b9ba217f4d4fcab1030 /share/examples/kld/cdev/module/cdev.c
parent6d9ab211ebee6249e6a59d14305833c9ec03048c (diff)
downloadFreeBSD-src-633d8b5f5a152bf3fdda8daf986ec47105ae879b.zip
FreeBSD-src-633d8b5f5a152bf3fdda8daf986ec47105ae879b.tar.gz
* Tidy up a few things and fix some more warnings.
* Change the devsw declaration to standard form and add missing fields * Change the filename from cdev_mod.ko to cdev.ko
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