summaryrefslogtreecommitdiff
path: root/sys/dev/vnd.c
diff options
context:
space:
mode:
authormlelstv <mlelstv@NetBSD.org>2014-11-04 07:51:54 +0000
committermlelstv <mlelstv@NetBSD.org>2014-11-04 07:51:54 +0000
commit0905bfabf18ad735e4ed2431c0d87c19dc783e3b (patch)
tree1e70e9f44b965530711e67d6e03a64f517616e64 /sys/dev/vnd.c
parent3be4de993b071579209521d1705cc45ec826d9b1 (diff)
support DIOCMWEDGES ioctl.
Diffstat (limited to 'sys/dev/vnd.c')
-rw-r--r--sys/dev/vnd.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index 3f01f668232..7a03d6b4dbe 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.233 2014/10/11 12:01:27 mlelstv Exp $ */
+/* $NetBSD: vnd.c,v 1.234 2014/11/04 07:51:54 mlelstv Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.233 2014/10/11 12:01:27 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.234 2014/11/04 07:51:54 mlelstv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_vnd.h"
@@ -1592,6 +1592,13 @@ unlock_and_exit:
return dkwedge_list(&vnd->sc_dkdev, dkwl, l);
+ case DIOCMWEDGES:
+ if ((flag & FWRITE) == 0)
+ return EBADF;
+
+ dkwedge_discover(&vnd->sc_dkdev);
+ return 0;
+
default:
return ENOTTY;
}