diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2023-08-21 08:13:38 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2023-08-21 08:13:38 +0000 |
commit | 3f740f34beb912568cb2f73eddcb66bad256805d (patch) | |
tree | 11b385aa44895aec8edc9460b2f367a90560c108 /sbin/bioctl | |
parent | d7f640b650f3e12c8d797c7bb8c261397f931a00 (diff) |
Print softraid(4) errors on standard error
INFO messages remain on stdin, WARN/ERROR go to stderr as usual to make
silencing and scripting bioctl(8) easier.
OK op jsing
Diffstat (limited to 'sbin/bioctl')
-rw-r--r-- | sbin/bioctl/bioctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/bioctl/bioctl.c b/sbin/bioctl/bioctl.c index 920f997606e..5a54734e33d 100644 --- a/sbin/bioctl/bioctl.c +++ b/sbin/bioctl/bioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bioctl.c,v 1.152 2023/08/18 14:09:19 kn Exp $ */ +/* $OpenBSD: bioctl.c,v 1.153 2023/08/21 08:13:37 kn Exp $ */ /* * Copyright (c) 2004, 2005 Marco Peereboom @@ -376,7 +376,8 @@ bio_status(struct bio_status *bs) prefix = __progname; for (i = 0; i < bs->bs_msg_count; i++) - printf("%s: %s\n", prefix, bs->bs_msgs[i].bm_msg); + fprintf(bs->bs_msgs[i].bm_type == BIO_MSG_INFO ? + stdout : stderr, "%s: %s\n", prefix, bs->bs_msgs[i].bm_msg); if (bs->bs_status == BIO_STATUS_ERROR) { if (bs->bs_msg_count == 0) |