summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2004-01-01 00:02:06 +0000
committerderaadt <deraadt@openbsd.org>2004-01-01 00:02:06 +0000
commit8bb3703fa530d28a258b37f845f611dc6b64981f (patch)
tree47228da4384f4cb05513721023c2a6c9cbfcb057
parentthere is no pause() wrapper (thread_sys_pause) so remove the prototype (diff)
downloadwireguard-openbsd-8bb3703fa530d28a258b37f845f611dc6b64981f.tar.xz
wireguard-openbsd-8bb3703fa530d28a258b37f845f611dc6b64981f.zip
use warnx for ENXIO devices, so that it says "Device not configured". For
other errors, continue too use the "is not a bridge" mantra.
-rw-r--r--sbin/brconfig/brconfig.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/brconfig/brconfig.c b/sbin/brconfig/brconfig.c
index 6747571d94a..a50de1adbf0 100644
--- a/sbin/brconfig/brconfig.c
+++ b/sbin/brconfig/brconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: brconfig.c,v 1.27 2003/09/26 03:29:59 deraadt Exp $ */
+/* $OpenBSD: brconfig.c,v 1.28 2004/01/01 00:02:06 deraadt Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
@@ -125,7 +125,10 @@ main(int argc, char *argv[])
return bridge_show_all(sock);
if (!is_bridge(sock, brdg)) {
- warnx("%s is not a bridge", brdg);
+ if (errno == ENXIO)
+ warn("%s", brdg);
+ else
+ warnx("%s is not a bridge", brdg);
return (EX_USAGE);
}