summaryrefslogtreecommitdiff
path: root/sys/dev/gpib
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2014-12-31 19:52:04 +0000
committerchristos <christos@NetBSD.org>2014-12-31 19:52:04 +0000
commit4a331aac448bc6ebd006fa2ea80af68f57c666eb (patch)
treea61e69370e02aa55f74db2134eb4c32a0ce55868 /sys/dev/gpib
parent7e0dbe4aff861a57f08f15f13b40808d8bd26a6f (diff)
make more drivers use disk_ioctl, and add a dev parameter to it so that
we can merge the "easy" disklabel ioctls to it. Ultimately all this will go do dk_ioctl once all the drivers have been converted.
Diffstat (limited to 'sys/dev/gpib')
-rw-r--r--sys/dev/gpib/rd.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/sys/dev/gpib/rd.c b/sys/dev/gpib/rd.c
index 1bb60358e59..af51ae6b162 100644
--- a/sys/dev/gpib/rd.c
+++ b/sys/dev/gpib/rd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rd.c,v 1.36 2014/08/10 16:44:35 tls Exp $ */
+/* $NetBSD: rd.c,v 1.37 2014/12/31 19:52:05 christos Exp $ */
/*-
* Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.36 2014/08/10 16:44:35 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.37 2014/12/31 19:52:05 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -972,17 +972,11 @@ rdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
DPRINTF(RDB_FOLLOW, ("rdioctl: sc=%p\n", sc));
- switch (cmd) {
- case DIOCGDINFO:
- *(struct disklabel *)data = *lp;
- return (0);
-
- case DIOCGPART:
- ((struct partinfo *)data)->disklab = lp;
- ((struct partinfo *)data)->part =
- &lp->d_partitions[RDPART(dev)];
- return (0);
+ error = disk_ioctl(&sk->sc_dk, dev, cmd, data, flag, l);
+ if (error != EPASSTHROUGH)
+ return error;
+ switch (cmd) {
case DIOCWLABEL:
if ((flag & FWRITE) == 0)
return (EBADF);