diff options
Diffstat (limited to 'usr.sbin/installboot/softraid.c')
| -rw-r--r-- | usr.sbin/installboot/softraid.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/usr.sbin/installboot/softraid.c b/usr.sbin/installboot/softraid.c index 8a3c5620fdc..c197164526a 100644 --- a/usr.sbin/installboot/softraid.c +++ b/usr.sbin/installboot/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.4 2015/10/03 16:56:52 krw Exp $ */ +/* $OpenBSD: softraid.c,v 1.5 2020/06/08 19:17:12 kn Exp $ */ /* * Copyright (c) 2012 Joel Sing <jsing@openbsd.org> * @@ -92,3 +92,19 @@ sr_volume(int devfd, char *dev, int *vol, int *disks) return 1; } + +void +sr_status(struct bio_status *bs) +{ + int i; + + for (i = 0; i < bs->bs_msg_count; i++) + warnx("%s", bs->bs_msgs[i].bm_msg); + + if (bs->bs_status == BIO_STATUS_ERROR) { + if (bs->bs_msg_count == 0) + errx(1, "unknown error"); + else + exit(1); + } +} |
