summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-01-01 00:02:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-01-01 00:02:07 +0000
commit65b04e5c5af45e28c9c0f3eb2141aca2a2e869e8 (patch)
treede19edfe2733dacf9f2046339e265eedc5d32b8b /sbin
parent5453dd463af44908f88c14340543d64e381a41ae (diff)
use warnx for ENXIO devices, so that it says "Device not configured". For
other errors, continue too use the "is not a bridge" mantra.
Diffstat (limited to 'sbin')
-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);
}