summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/softraid_aoe.c14
-rw-r--r--sys/dev/softraid_concat.c5
-rw-r--r--sys/dev/softraid_crypto.c5
-rw-r--r--sys/dev/softraid_raid0.c5
-rw-r--r--sys/dev/softraid_raid1.c6
-rw-r--r--sys/dev/softraid_raid6.c8
-rw-r--r--sys/dev/softraid_raidp.c8
7 files changed, 31 insertions, 20 deletions
diff --git a/sys/dev/softraid_aoe.c b/sys/dev/softraid_aoe.c
index 6f864ed2f59..fa34962f492 100644
--- a/sys/dev/softraid_aoe.c
+++ b/sys/dev/softraid_aoe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_aoe.c,v 1.31 2013/03/31 11:37:40 jsing Exp $ */
+/* $OpenBSD: softraid_aoe.c,v 1.32 2013/03/31 15:44:52 jsing Exp $ */
/*
* Copyright (c) 2008 Ted Unangst <tedu@openbsd.org>
* Copyright (c) 2008 Marco Peereboom <marco@openbsd.org>
@@ -130,9 +130,11 @@ int
sr_aoe_create(struct sr_discipline *sd, struct bioc_createraid *bc,
int no_chunk, int64_t coerced_size)
{
-
- if (no_chunk != 1)
+ if (no_chunk != 1) {
+ sr_error(sd->sd_sc, "%s requires exactly one chunk",
+ sd->sd_name);
return EINVAL;
+ }
sd->sd_max_ccb_per_wu = no_chunk;
@@ -562,9 +564,11 @@ int
sr_aoe_server_create(struct sr_discipline *sd, struct bioc_createraid *bc,
int no_chunk, int64_t coerced_size)
{
-
- if (no_chunk != 1)
+ if (no_chunk != 1) {
+ sr_error(sd->sd_sc, "%s requires exactly one chunk",
+ sd->sd_name);
return EINVAL;
+ }
sd->sd_meta->ssdi.ssd_size = coerced_size;
diff --git a/sys/dev/softraid_concat.c b/sys/dev/softraid_concat.c
index 71fd7cd18f9..a6f197b3132 100644
--- a/sys/dev/softraid_concat.c
+++ b/sys/dev/softraid_concat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_concat.c,v 1.14 2013/03/31 13:31:44 jsing Exp $ */
+/* $OpenBSD: softraid_concat.c,v 1.15 2013/03/31 15:44:52 jsing Exp $ */
/*
* Copyright (c) 2008 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2011 Joel Sing <jsing@openbsd.org>
@@ -63,7 +63,8 @@ sr_concat_create(struct sr_discipline *sd, struct bioc_createraid *bc,
int i;
if (no_chunk < 2) {
- sr_error(sd->sd_sc, "CONCAT requires two or more chunks");
+ sr_error(sd->sd_sc, "%s requires two or more chunks",
+ sd->sd_name);
return EINVAL;
}
diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c
index 1cf46fc4bf0..952d2852309 100644
--- a/sys/dev/softraid_crypto.c
+++ b/sys/dev/softraid_crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_crypto.c,v 1.90 2013/03/31 11:37:40 jsing Exp $ */
+/* $OpenBSD: softraid_crypto.c,v 1.91 2013/03/31 15:44:52 jsing Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Hans-Joerg Hoexer <hshoexer@openbsd.org>
@@ -140,7 +140,8 @@ sr_crypto_create(struct sr_discipline *sd, struct bioc_createraid *bc,
int rv = EINVAL;
if (no_chunk != 1) {
- sr_error(sd->sd_sc, "CRYPTO requires exactly one chunk");
+ sr_error(sd->sd_sc, "%s requires exactly one chunk",
+ sd->sd_name);
goto done;
}
diff --git a/sys/dev/softraid_raid0.c b/sys/dev/softraid_raid0.c
index fbe6529f750..98cd65c9677 100644
--- a/sys/dev/softraid_raid0.c
+++ b/sys/dev/softraid_raid0.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid0.c,v 1.38 2013/03/31 11:12:06 jsing Exp $ */
+/* $OpenBSD: softraid_raid0.c,v 1.39 2013/03/31 15:44:52 jsing Exp $ */
/*
* Copyright (c) 2008 Marco Peereboom <marco@peereboom.us>
*
@@ -73,7 +73,8 @@ sr_raid0_create(struct sr_discipline *sd, struct bioc_createraid *bc,
int no_chunk, int64_t coerced_size)
{
if (no_chunk < 2) {
- sr_error(sd->sd_sc, "RAID 0 requires two or more chunks");
+ sr_error(sd->sd_sc, "%s requires two or more chunks",
+ sd->sd_name);
return EINVAL;
}
diff --git a/sys/dev/softraid_raid1.c b/sys/dev/softraid_raid1.c
index 56037d4b9c0..9479caf0b57 100644
--- a/sys/dev/softraid_raid1.c
+++ b/sys/dev/softraid_raid1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid1.c,v 1.48 2013/03/31 13:31:44 jsing Exp $ */
+/* $OpenBSD: softraid_raid1.c,v 1.49 2013/03/31 15:44:52 jsing Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
*
@@ -78,9 +78,9 @@ int
sr_raid1_create(struct sr_discipline *sd, struct bioc_createraid *bc,
int no_chunk, int64_t coerced_size)
{
-
if (no_chunk < 2) {
- sr_error(sd->sd_sc, "RAID 1 requires two or more chunks");
+ sr_error(sd->sd_sc, "%s requires two or more chunks",
+ sd->sd_name);
return EINVAL;
}
diff --git a/sys/dev/softraid_raid6.c b/sys/dev/softraid_raid6.c
index 1c9d67bb402..d66c8f00c91 100644
--- a/sys/dev/softraid_raid6.c
+++ b/sys/dev/softraid_raid6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid6.c,v 1.43 2013/03/31 11:12:06 jsing Exp $ */
+/* $OpenBSD: softraid_raid6.c,v 1.44 2013/03/31 15:44:52 jsing Exp $ */
/*
* Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org>
@@ -116,9 +116,11 @@ int
sr_raid6_create(struct sr_discipline *sd, struct bioc_createraid *bc,
int no_chunk, int64_t coerced_size)
{
-
- if (no_chunk < 4)
+ if (no_chunk < 4) {
+ sr_error(sd->sd_sc, "%s requires four or more chunks",
+ sd->sd_name);
return EINVAL;
+ }
/*
* XXX add variable strip size later even though MAXPHYS is really
diff --git a/sys/dev/softraid_raidp.c b/sys/dev/softraid_raidp.c
index 573cb43c243..dbae4a3ea8e 100644
--- a/sys/dev/softraid_raidp.c
+++ b/sys/dev/softraid_raidp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raidp.c,v 1.40 2013/03/31 11:12:06 jsing Exp $ */
+/* $OpenBSD: softraid_raidp.c,v 1.41 2013/03/31 15:44:52 jsing Exp $ */
/*
* Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org>
@@ -94,9 +94,11 @@ int
sr_raidp_create(struct sr_discipline *sd, struct bioc_createraid *bc,
int no_chunk, int64_t coerced_size)
{
-
- if (no_chunk < 3)
+ if (no_chunk < 3) {
+ sr_error(sd->sd_sc, "%s requires three or more chunks",
+ sd->sd_name);
return EINVAL;
+ }
/*
* XXX add variable strip size later even though MAXPHYS is really