summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2008-03-26 00:48:55 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2008-03-26 00:48:55 +0000
commit16193a5b5ffe9bbf390273a59772d8600977f65f (patch)
tree7a3a4f34557f0ae64e8a2789c446f2848251200a /sys
parent353874ab9e5533e2e269e28eb14fac00e5b00fb0 (diff)
Add DIOCRLDINFO support.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/raidframe/rf_openbsdkintf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/raidframe/rf_openbsdkintf.c b/sys/dev/raidframe/rf_openbsdkintf.c
index 6e523a046ba..385a8c5f4f5 100644
--- a/sys/dev/raidframe/rf_openbsdkintf.c
+++ b/sys/dev/raidframe/rf_openbsdkintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rf_openbsdkintf.c,v 1.46 2008/03/24 01:16:58 krw Exp $ */
+/* $OpenBSD: rf_openbsdkintf.c,v 1.47 2008/03/26 00:48:54 krw Exp $ */
/* $NetBSD: rf_netbsdkintf.c,v 1.109 2001/07/27 03:30:07 oster Exp $ */
/*-
@@ -833,6 +833,7 @@ raidioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
int error = 0;
int part, pmask;
struct raid_softc *rs;
+ struct disklabel *lp;
RF_Config_t *k_cfg, *u_cfg;
RF_Raid_t *raidPtr;
RF_RaidDisk_t *diskPtr;
@@ -876,6 +877,7 @@ raidioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
case DIOCWDINFO:
case DIOCGPART:
case DIOCWLABEL:
+ case DIOCRLDINFO:
case DIOCGPDINFO:
case RAIDFRAME_SHUTDOWN:
case RAIDFRAME_REWRITEPARITY:
@@ -1532,6 +1534,13 @@ raidioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
* Add support for "regular" device ioctls here.
*/
switch (cmd) {
+ case DIOCRLDINFO:
+ lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
+ raidgetdisklabel(dev, rs, lp, 0);
+ bcopy(lp, rs->sc_dkdev.dk_label, sizeof(*lp));
+ free(lp, M_TEMP);
+ break;
+
case DIOCGDINFO:
*(struct disklabel *)data = *(rs->sc_dkdev.dk_label);
break;