summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2003-07-30 01:42:48 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2003-07-30 01:42:48 +0000
commit99bf4480a66b606eb4d59c5e1f0a65e469179f42 (patch)
tree004cdfbe8709f29c8df06f71b55bc81298bc4b54 /sbin
parent8cf6c14ab466f2ab0418b40dc8f200016ceb36a0 (diff)
change SIOCDIFADDR/SIOCAIFADDR warnings into errors (now this has correct
return code in certain cases); ok henning itojun
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 55e39d4c2bd..10d8c934874 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.77 2003/06/26 07:27:32 deraadt Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.78 2003/07/30 01:42:47 pvalchev Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -77,7 +77,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
#else
-static const char rcsid[] = "$OpenBSD: ifconfig.c,v 1.77 2003/06/26 07:27:32 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: ifconfig.c,v 1.78 2003/07/30 01:42:47 pvalchev Exp $";
#endif
#endif /* not lint */
@@ -530,13 +530,13 @@ main(int argc, char *argv[])
if (errno == EADDRNOTAVAIL && (doalias >= 0)) {
/* means no previous address for interface */
} else
- warn("SIOCDIFADDR");
+ err(1, "SIOCDIFADDR");
}
}
if (newaddr) {
(void) strlcpy(rafp->af_addreq, name, sizeof(ifr.ifr_name));
if (ioctl(s, rafp->af_aifaddr, rafp->af_addreq) < 0)
- warn("SIOCAIFADDR");
+ err(1, "SIOCAIFADDR");
}
exit(0);
}