diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2012-01-22 11:13:33 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2012-01-22 11:13:33 +0000 |
commit | 971ad6bd36c44b88da9d8fb41ff3b26a59fd79de (patch) | |
tree | 1660473a81df08db46e52604a16ce1e1dcc4773c /sys/dev/softraid_raid1.c | |
parent | dc525b2b303cabb8371d35abcc681c9b9a2f42f5 (diff) |
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_raid1.c')
-rw-r--r-- | sys/dev/softraid_raid1.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/softraid_raid1.c b/sys/dev/softraid_raid1.c index 34f7804a4b1..bc61f87d2d5 100644 --- a/sys/dev/softraid_raid1.c +++ b/sys/dev/softraid_raid1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_raid1.c,v 1.30 2011/12/26 14:54:52 jsing Exp $ */ +/* $OpenBSD: softraid_raid1.c,v 1.31 2012/01/22 11:13:32 jsing Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * @@ -82,8 +82,10 @@ sr_raid1_create(struct sr_discipline *sd, struct bioc_createraid *bc, int no_chunk, int64_t coerced_size) { - if (no_chunk < 2) + if (no_chunk < 2) { + sr_error(sd->sd_sc, "RAID 1 requires two or more chunks"); return EINVAL; + } strlcpy(sd->sd_name, "RAID 1", sizeof(sd->sd_name)); sd->sd_meta->ssdi.ssd_size = coerced_size; |