diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-11-21 13:26:26 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-11-21 13:26:26 +0000 |
commit | 7c10cb8430e7817009359effc0caa9daf3276bc0 (patch) | |
tree | e980f2db1073f1ef0c1e34311636dbd9e7decdf5 /usr.sbin | |
parent | 11fbd90fda36e04b84809e11d87dc2ff354b4e89 (diff) |
Unify error reporting in various control programs.
Just use "read error" since the code also uses "write error" for the
imsg_flush case.
OK tb@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpctl/bgpctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/dhcp6leasectl/dhcp6leasectl.c | 4 | ||||
-rw-r--r-- | usr.sbin/dhcpleasectl/dhcpleasectl.c | 4 | ||||
-rw-r--r-- | usr.sbin/dvmrpctl/dvmrpctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/eigrpctl/eigrpctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/ikectl/ikectl.c | 4 | ||||
-rw-r--r-- | usr.sbin/ldapctl/ldapctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/ldpctl/ldpctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/ntpd/ntpd.c | 8 | ||||
-rw-r--r-- | usr.sbin/ospf6ctl/ospf6ctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/ospfctl/ospfctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/ractl/ractl.c | 4 | ||||
-rw-r--r-- | usr.sbin/relayctl/relayctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/ripctl/ripctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/slaacctl/slaacctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/smtpd/enqueue.c | 4 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/unwindctl/unwindctl.c | 4 | ||||
-rw-r--r-- | usr.sbin/vmctl/main.c | 4 |
19 files changed, 40 insertions, 40 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c index c8c7803a08c..3bac478540d 100644 --- a/usr.sbin/bgpctl/bgpctl.c +++ b/usr.sbin/bgpctl/bgpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpctl.c,v 1.309 2024/11/21 13:17:01 claudio Exp $ */ +/* $OpenBSD: bgpctl.c,v 1.310 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -436,7 +436,7 @@ main(int argc, char *argv[]) break; if ((n = imsgbuf_read(imsgbuf)) == -1) - err(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/dhcp6leasectl/dhcp6leasectl.c b/usr.sbin/dhcp6leasectl/dhcp6leasectl.c index b29eb42b1af..4a2f10385c2 100644 --- a/usr.sbin/dhcp6leasectl/dhcp6leasectl.c +++ b/usr.sbin/dhcp6leasectl/dhcp6leasectl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcp6leasectl.c,v 1.4 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: dhcp6leasectl.c,v 1.5 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2021, 2024 Florian Obser <florian@openbsd.org> @@ -140,7 +140,7 @@ main(int argc, char *argv[]) err(1, "write error"); if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/dhcpleasectl/dhcpleasectl.c b/usr.sbin/dhcpleasectl/dhcpleasectl.c index 389769dd99c..3f679f1a9f4 100644 --- a/usr.sbin/dhcpleasectl/dhcpleasectl.c +++ b/usr.sbin/dhcpleasectl/dhcpleasectl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpleasectl.c,v 1.11 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: dhcpleasectl.c,v 1.12 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2021 Florian Obser <florian@openbsd.org> @@ -174,7 +174,7 @@ main(int argc, char *argv[]) err(1, "write error"); if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/dvmrpctl/dvmrpctl.c b/usr.sbin/dvmrpctl/dvmrpctl.c index a31f5ead2bc..ed56c011f8f 100644 --- a/usr.sbin/dvmrpctl/dvmrpctl.c +++ b/usr.sbin/dvmrpctl/dvmrpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dvmrpctl.c,v 1.19 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: dvmrpctl.c,v 1.20 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -178,7 +178,7 @@ main(int argc, char *argv[]) while (!done) { if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/eigrpctl/eigrpctl.c b/usr.sbin/eigrpctl/eigrpctl.c index b0779eba043..cec884ef8c9 100644 --- a/usr.sbin/eigrpctl/eigrpctl.c +++ b/usr.sbin/eigrpctl/eigrpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eigrpctl.c,v 1.12 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: eigrpctl.c,v 1.13 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2015 Renato Westphal <renato@openbsd.org> @@ -222,7 +222,7 @@ main(int argc, char *argv[]) while (!done) { if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/ikectl/ikectl.c b/usr.sbin/ikectl/ikectl.c index 93f061c0460..71c58fdcd2f 100644 --- a/usr.sbin/ikectl/ikectl.c +++ b/usr.sbin/ikectl/ikectl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikectl.c,v 1.34 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: ikectl.c,v 1.35 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2007-2013 Reyk Floeter <reyk@openbsd.org> @@ -344,7 +344,7 @@ main(int argc, char *argv[]) while (!done) { if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/ldapctl/ldapctl.c b/usr.sbin/ldapctl/ldapctl.c index 0178a0be336..d8d2d688c04 100644 --- a/usr.sbin/ldapctl/ldapctl.c +++ b/usr.sbin/ldapctl/ldapctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldapctl.c,v 1.19 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: ldapctl.c,v 1.20 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se> @@ -360,7 +360,7 @@ main(int argc, char *argv[]) while (!done) { if ((n = imsgbuf_read(&ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/ldpctl/ldpctl.c b/usr.sbin/ldpctl/ldpctl.c index 1b9571e863c..5319bcf9aeb 100644 --- a/usr.sbin/ldpctl/ldpctl.c +++ b/usr.sbin/ldpctl/ldpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldpctl.c,v 1.35 2024/11/21 13:21:34 claudio Exp $ +/* $OpenBSD: ldpctl.c,v 1.36 2024/11/21 13:26:25 claudio Exp $ * * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -211,7 +211,7 @@ main(int argc, char *argv[]) while (!done) { if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c index 1fb662d2e7a..0a99fee9316 100644 --- a/usr.sbin/ntpd/ntpd.c +++ b/usr.sbin/ntpd/ntpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.c,v 1.140 2024/11/21 13:24:39 claudio Exp $ */ +/* $OpenBSD: ntpd.c,v 1.141 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -695,14 +695,14 @@ ctl_main(int argc, char *argv[]) } if (imsgbuf_flush(ibuf_ctl) == -1) - err(1, "ibuf_ctl: imsgbuf_flush error"); + err(1, "write error"); done = 0; while (!done) { if ((n = imsgbuf_read(ibuf_ctl)) == -1) - err(1, "ibuf_ctl: imsgbuf_read error"); + err(1, "read error"); if (n == 0) - errx(1, "ntpctl: pipe closed"); + errx(1, "pipe closed"); while (!done) { if ((n = imsg_get(ibuf_ctl, &imsg)) == -1) diff --git a/usr.sbin/ospf6ctl/ospf6ctl.c b/usr.sbin/ospf6ctl/ospf6ctl.c index 965edcc86af..6f8cc882f58 100644 --- a/usr.sbin/ospf6ctl/ospf6ctl.c +++ b/usr.sbin/ospf6ctl/ospf6ctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospf6ctl.c,v 1.57 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: ospf6ctl.c,v 1.58 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -255,7 +255,7 @@ main(int argc, char *argv[]) while (!done) { if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/ospfctl/ospfctl.c b/usr.sbin/ospfctl/ospfctl.c index f5ffd5134d0..ef6255a40e0 100644 --- a/usr.sbin/ospfctl/ospfctl.c +++ b/usr.sbin/ospfctl/ospfctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfctl.c,v 1.71 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: ospfctl.c,v 1.72 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -222,7 +222,7 @@ main(int argc, char *argv[]) while (!done) { if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/ractl/ractl.c b/usr.sbin/ractl/ractl.c index 003bc55f245..6d4f6d6daf3 100644 --- a/usr.sbin/ractl/ractl.c +++ b/usr.sbin/ractl/ractl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ractl.c,v 1.6 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: ractl.c,v 1.7 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -128,7 +128,7 @@ main(int argc, char *argv[]) while (!done) { if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/relayctl/relayctl.c b/usr.sbin/relayctl/relayctl.c index ed0fa92b97d..d25bae9342f 100644 --- a/usr.sbin/relayctl/relayctl.c +++ b/usr.sbin/relayctl/relayctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayctl.c,v 1.61 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: relayctl.c,v 1.62 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2007 - 2013 Reyk Floeter <reyk@openbsd.org> @@ -226,7 +226,7 @@ main(int argc, char *argv[]) while (!done) { if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/ripctl/ripctl.c b/usr.sbin/ripctl/ripctl.c index faaf8634903..c3e1bb664e4 100644 --- a/usr.sbin/ripctl/ripctl.c +++ b/usr.sbin/ripctl/ripctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ripctl.c,v 1.20 2024/11/21 13:21:34 claudio Exp $ +/* $OpenBSD: ripctl.c,v 1.21 2024/11/21 13:26:25 claudio Exp $ * * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it> * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -192,7 +192,7 @@ main(int argc, char *argv[]) while (!done) { if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/slaacctl/slaacctl.c b/usr.sbin/slaacctl/slaacctl.c index f70b79aefde..3debc535754 100644 --- a/usr.sbin/slaacctl/slaacctl.c +++ b/usr.sbin/slaacctl/slaacctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slaacctl.c,v 1.26 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: slaacctl.c,v 1.27 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -141,7 +141,7 @@ main(int argc, char *argv[]) while (!done) { if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/smtpd/enqueue.c b/usr.sbin/smtpd/enqueue.c index a901482be03..0dc0ffae1a6 100644 --- a/usr.sbin/smtpd/enqueue.c +++ b/usr.sbin/smtpd/enqueue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: enqueue.c,v 1.125 2024/11/21 13:22:21 claudio Exp $ */ +/* $OpenBSD: enqueue.c,v 1.126 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2005 Henning Brauer <henning@bulabula.org> @@ -789,7 +789,7 @@ open_connection(void) while (1) { if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c index c403d217d97..fb3d3f3714b 100644 --- a/usr.sbin/smtpd/smtpctl.c +++ b/usr.sbin/smtpd/smtpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpctl.c,v 1.174 2024/11/21 13:22:21 claudio Exp $ */ +/* $OpenBSD: smtpctl.c,v 1.175 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2013 Eric Faurot <eric@openbsd.org> @@ -193,7 +193,7 @@ srv_recv(int type) } if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); } diff --git a/usr.sbin/unwindctl/unwindctl.c b/usr.sbin/unwindctl/unwindctl.c index 8e528049c17..8c7f34e2826 100644 --- a/usr.sbin/unwindctl/unwindctl.c +++ b/usr.sbin/unwindctl/unwindctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: unwindctl.c,v 1.32 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: unwindctl.c,v 1.33 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -182,7 +182,7 @@ main(int argc, char *argv[]) while (!done) { if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); diff --git a/usr.sbin/vmctl/main.c b/usr.sbin/vmctl/main.c index 3e51738368d..444477f0ff6 100644 --- a/usr.sbin/vmctl/main.c +++ b/usr.sbin/vmctl/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.82 2024/11/21 13:21:34 claudio Exp $ */ +/* $OpenBSD: main.c,v 1.83 2024/11/21 13:26:25 claudio Exp $ */ /* * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> @@ -278,7 +278,7 @@ vmmaction(struct parse_result *res) while (!done) { if ((n = imsgbuf_read(ibuf)) == -1) - errx(1, "imsgbuf_read error"); + err(1, "read error"); if (n == 0) errx(1, "pipe closed"); |