summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authorhaad <haad@NetBSD.org>2009-06-05 21:52:31 +0000
committerhaad <haad@NetBSD.org>2009-06-05 21:52:31 +0000
commitf5b48500f1089d675892504e2553046e3354ae10 (patch)
tree40c971804fa6a544411b12b97c077ffe264c741c /sys/dev/raidframe
parentb05bf051db05da72f9059fa574669157e0e89c0a (diff)
Add support for DIOCGDISKINFO to disk like device drivers. Change
partutil.c::getdiskinfo to use it to get disk geometry info. Use DIOCGWEDGEINFO ioctl to get information about partition size, if disk driver doesn't support it use old DIOCGDINFO. This patch adds support for wedge like devices(lvm logical volumes, ZFS zvol partitions) to newfs and other tools. No objections on tech-userlevel@.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c
index 52e3f9e69da..f37509ced3e 100644
--- a/sys/dev/raidframe/rf_netbsdkintf.c
+++ b/sys/dev/raidframe/rf_netbsdkintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.262 2009/05/12 13:19:50 cegger Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.263 2009/06/05 21:52:32 haad Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -139,7 +139,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.262 2009/05/12 13:19:50 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.263 2009/06/05 21:52:32 haad Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -1731,6 +1731,10 @@ raidioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
/*
* Add support for "regular" device ioctls here.
*/
+
+ error = disk_ioctl(&rs->sc_dkdev, cmd, addr, flag, l);
+ if (error != EPASSTHROUGH)
+ return (error);
switch (cmd) {
case DIOCGDINFO: