summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2007-06-01 00:00:54 +0000
committertedu <tedu@openbsd.org>2007-06-01 00:00:54 +0000
commit98b750e4f9b2b1b3d6da0cb63d07890a3156febd (patch)
tree033720000c18a5a40c94b954ff31c1c661094ae2
parentpanic if mtx_leave is called on an unlocked mutex. ok kettenis@ (diff)
downloadwireguard-openbsd-98b750e4f9b2b1b3d6da0cb63d07890a3156febd.tar.xz
wireguard-openbsd-98b750e4f9b2b1b3d6da0cb63d07890a3156febd.zip
support for softraid level 'c'.
-rw-r--r--sbin/bioctl/bioctl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sbin/bioctl/bioctl.c b/sbin/bioctl/bioctl.c
index 8afaa413071..82326916f35 100644
--- a/sbin/bioctl/bioctl.c
+++ b/sbin/bioctl/bioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bioctl.c,v 1.56 2007/05/31 04:23:23 grunk Exp $ */
+/* $OpenBSD: bioctl.c,v 1.57 2007/06/01 00:00:54 tedu Exp $ */
/*
* Copyright (c) 2004, 2005 Marco Peereboom
@@ -104,7 +104,10 @@ main(int argc, char *argv[])
break;
case 'c': /* create */
func |= BIOC_CREATERAID;
- cr_level = atoi(optarg);
+ if (isdigit(*optarg))
+ cr_level = atoi(optarg);
+ else
+ cr_level = *optarg;
break;
case 'u': /* unblink */
func |= BIOC_BLINK;
@@ -605,6 +608,9 @@ bio_createraid(u_int16_t level, char *dev_list)
case 1:
min_disks = 2;
break;
+ case 'c':
+ min_disks = 1;
+ break;
default:
errx(1, "unsupported raid level");
}