summaryrefslogtreecommitdiffstats
path: root/share/examples/kld/cdev
diff options
context:
space:
mode:
authormaxim <maxim@FreeBSD.org>2004-06-09 17:10:41 +0000
committermaxim <maxim@FreeBSD.org>2004-06-09 17:10:41 +0000
commit0a027ed49a334a9fe60e38f19d3dd40fdf9d73ca (patch)
treecfdfc80aa3ea917f5e54ceb2c463f0e3e2cf4901 /share/examples/kld/cdev
parent9547ff39064d278e4feecf013432886fca48dd76 (diff)
downloadFreeBSD-src-0a027ed49a334a9fe60e38f19d3dd40fdf9d73ca.zip
FreeBSD-src-0a027ed49a334a9fe60e38f19d3dd40fdf9d73ca.tar.gz
Style.
Diffstat (limited to 'share/examples/kld/cdev')
-rw-r--r--share/examples/kld/cdev/module/cdev.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/share/examples/kld/cdev/module/cdev.c b/share/examples/kld/cdev/module/cdev.c
index 0423803..45c3736 100644
--- a/share/examples/kld/cdev/module/cdev.c
+++ b/share/examples/kld/cdev/module/cdev.c
@@ -67,9 +67,8 @@
*
* $FreeBSD$
*/
-#include <sys/types.h>
-#include <sys/uio.h>
#include <sys/param.h>
+#include <sys/uio.h>
#include <sys/proc.h>
#include <sys/systm.h>
#include <sys/ioccom.h>
@@ -138,7 +137,7 @@ mydev_ioctl(dev_t dev, u_long cmd, caddr_t arg, int mode, struct thread *td)
error = EINVAL;
break;
}
- return error;
+ return (error);
}
/*
@@ -161,7 +160,7 @@ mydev_write(dev_t dev, struct uio *uio, int ioflag)
}
/*
- * The mydev_read function just takes the buf that was saved
+ * The mydev_read function just takes the buf that was saved
* via mydev_write() and returns it to userland for
* accessing.
*/
@@ -174,7 +173,7 @@ mydev_read(dev_t dev, struct uio *uio, int ioflag)
dev2udev(dev), uio, ioflag);
if (len <= 0) {
- err = -1;
+ err = -1;
} else { /* copy buf to userland */
copystr(&buf, uio->uio_iov->iov_base, 513, &len);
}
OpenPOWER on IntegriCloud