summaryrefslogtreecommitdiff
path: root/sys/dev/ccd.c
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/ccd.c
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/ccd.c')
-rw-r--r--sys/dev/ccd.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c
index 9e138398448..fe26f8b81af 100644
--- a/sys/dev/ccd.c
+++ b/sys/dev/ccd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ccd.c,v 1.160 2014/12/31 17:06:48 christos Exp $ */
+/* $NetBSD: ccd.c,v 1.161 2014/12/31 19:52:05 christos Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.160 2014/12/31 17:06:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.161 2014/12/31 19:52:05 christos Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -1196,7 +1196,7 @@ ccdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
}
}
- error = disk_ioctl(&cs->sc_dkdev, cmd, data, flag, l);
+ error = disk_ioctl(&cs->sc_dkdev, dev, cmd, data, flag, l);
if (error != EPASSTHROUGH)
goto out;
@@ -1383,25 +1383,6 @@ ccdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
/* Don't break, otherwise cs is read again. */
return 0;
- case DIOCGDINFO:
- *(struct disklabel *)data = *(cs->sc_dkdev.dk_label);
- break;
-
-#ifdef __HAVE_OLD_DISKLABEL
- case ODIOCGDINFO:
- newlabel = *(cs->sc_dkdev.dk_label);
- if (newlabel.d_npartitions > OLDMAXPARTITIONS)
- return ENOTTY;
- memcpy(data, &newlabel, sizeof (struct olddisklabel));
- break;
-#endif
-
- case DIOCGPART:
- ((struct partinfo *)data)->disklab = cs->sc_dkdev.dk_label;
- ((struct partinfo *)data)->part =
- &cs->sc_dkdev.dk_label->d_partitions[DISKPART(dev)];
- break;
-
case DIOCCACHESYNC:
/*
* We pass this call down to all components and report