diff options
author | 2007-06-01 00:00:54 +0000 | |
---|---|---|
committer | 2007-06-01 00:00:54 +0000 | |
commit | 98b750e4f9b2b1b3d6da0cb63d07890a3156febd (patch) | |
tree | 033720000c18a5a40c94b954ff31c1c661094ae2 | |
parent | panic if mtx_leave is called on an unlocked mutex. ok kettenis@ (diff) | |
download | wireguard-openbsd-98b750e4f9b2b1b3d6da0cb63d07890a3156febd.tar.xz wireguard-openbsd-98b750e4f9b2b1b3d6da0cb63d07890a3156febd.zip |
support for softraid level 'c'.
-rw-r--r-- | sbin/bioctl/bioctl.c | 10 |
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"); } |