summaryrefslogtreecommitdiffstats
path: root/sys/dev/softraid_concat.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2012-01-22 11:13:31 +0000
committerjsing <jsing@openbsd.org>2012-01-22 11:13:31 +0000
commit5f08213045e07b53e05e099b8011005b75850cdb (patch)
treebcc175e8e425f4129c876ff433d9ca0d0e211f6c /sys/dev/softraid_concat.c
parentIf no controller name is provided, use the program name as a prefix. Also, (diff)
downloadwireguard-openbsd-5f08213045e07b53e05e099b8011005b75850cdb.tar.xz
wireguard-openbsd-5f08213045e07b53e05e099b8011005b75850cdb.zip
Convert softraid(4) to new bio(4) status interface. This allows bioctl(8)
to provide useful feedback, rather than reporting an ioctl failure and leaving the user to consult dmesg. For now we continue to print most things to the console, even if the message is a result of an ioctl.
Diffstat (limited to 'sys/dev/softraid_concat.c')
-rw-r--r--sys/dev/softraid_concat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/softraid_concat.c b/sys/dev/softraid_concat.c
index 9b7712e1ad1..ffa206c63b8 100644
--- a/sys/dev/softraid_concat.c
+++ b/sys/dev/softraid_concat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_concat.c,v 1.1 2011/12/31 17:06:10 jsing Exp $ */
+/* $OpenBSD: softraid_concat.c,v 1.2 2012/01/22 11:13:32 jsing Exp $ */
/*
* Copyright (c) 2008 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2011 Joel Sing <jsing@openbsd.org>
@@ -66,8 +66,10 @@ sr_concat_create(struct sr_discipline *sd, struct bioc_createraid *bc,
{
int i;
- if (no_chunk < 2)
+ if (no_chunk < 2) {
+ sr_error(sd->sd_sc, "CONCAT requires two or more chunks");
return EINVAL;
+ }
strlcpy(sd->sd_name, "CONCAT", sizeof(sd->sd_name));