summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@NetBSD.org>2006-06-14 11:05:42 +0000
committertron <tron@NetBSD.org>2006-06-14 11:05:42 +0000
commit2ab5da17ceddb3bf5e7b02474a9b71d6485c205a (patch)
tree5e9fc1c845095f97515d44e77e4ddf9518f81931
parentb1dcde428fc037cf4c1f32730c7a5dd80175cad3 (diff)
Adapt ifconfig(8) to new return value from socket(2). This stops
ifconfig(8) from printing errors like "ifconfig: socket: Address family not supported by protocol family" when examining the status of a network interface.
-rw-r--r--sbin/ifconfig/af_atalk.c6
-rw-r--r--sbin/ifconfig/af_inet.c6
-rw-r--r--sbin/ifconfig/af_inet6.c6
-rw-r--r--sbin/ifconfig/af_iso.c6
-rw-r--r--sbin/ifconfig/af_ns.c6
5 files changed, 15 insertions, 15 deletions
diff --git a/sbin/ifconfig/af_atalk.c b/sbin/ifconfig/af_atalk.c
index bcccb49e3d0..184416ace6a 100644
--- a/sbin/ifconfig/af_atalk.c
+++ b/sbin/ifconfig/af_atalk.c
@@ -1,4 +1,4 @@
-/* $NetBSD: af_atalk.c,v 1.1 2005/03/19 23:32:55 thorpej Exp $ */
+/* $NetBSD: af_atalk.c,v 1.2 2006/06/14 11:05:42 tron Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: af_atalk.c,v 1.1 2005/03/19 23:32:55 thorpej Exp $");
+__RCSID("$NetBSD: af_atalk.c,v 1.2 2006/06/14 11:05:42 tron Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -126,7 +126,7 @@ at_status(int force)
getsock(AF_APPLETALK);
if (s < 0) {
- if (errno == EPROTONOSUPPORT)
+ if (errno == EAFNOSUPPORT)
return;
err(EXIT_FAILURE, "socket");
}
diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c
index dcfac61ab51..35fc096204b 100644
--- a/sbin/ifconfig/af_inet.c
+++ b/sbin/ifconfig/af_inet.c
@@ -1,4 +1,4 @@
-/* $NetBSD: af_inet.c,v 1.1 2005/03/20 02:43:50 thorpej Exp $ */
+/* $NetBSD: af_inet.c,v 1.2 2006/06/14 11:05:42 tron Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: af_inet.c,v 1.1 2005/03/20 02:43:50 thorpej Exp $");
+__RCSID("$NetBSD: af_inet.c,v 1.2 2006/06/14 11:05:42 tron Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -83,7 +83,7 @@ in_alias(struct ifreq *creq)
/* Get the non-alias address for this interface. */
getsock(AF_INET);
if (s < 0) {
- if (errno == EPROTONOSUPPORT)
+ if (errno == EAFNOSUPPORT)
return;
err(EXIT_FAILURE, "socket");
}
diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c
index e778e4f99dd..ce0c02a1821 100644
--- a/sbin/ifconfig/af_inet6.c
+++ b/sbin/ifconfig/af_inet6.c
@@ -1,4 +1,4 @@
-/* $NetBSD: af_inet6.c,v 1.2 2005/03/20 02:44:50 thorpej Exp $ */
+/* $NetBSD: af_inet6.c,v 1.3 2006/06/14 11:05:42 tron Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: af_inet6.c,v 1.2 2005/03/20 02:44:50 thorpej Exp $");
+__RCSID("$NetBSD: af_inet6.c,v 1.3 2006/06/14 11:05:42 tron Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -230,7 +230,7 @@ in6_alias(struct in6_ifreq *creq)
/* Get the non-alias address for this interface. */
getsock(AF_INET6);
if (s < 0) {
- if (errno == EPROTONOSUPPORT)
+ if (errno == EAFNOSUPPORT)
return;
err(EXIT_FAILURE, "socket");
}
diff --git a/sbin/ifconfig/af_iso.c b/sbin/ifconfig/af_iso.c
index bb1d36773b7..a4152b31bed 100644
--- a/sbin/ifconfig/af_iso.c
+++ b/sbin/ifconfig/af_iso.c
@@ -1,4 +1,4 @@
-/* $NetBSD: af_iso.c,v 1.1 2005/03/20 00:02:58 thorpej Exp $ */
+/* $NetBSD: af_iso.c,v 1.2 2006/06/14 11:05:42 tron Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: af_iso.c,v 1.1 2005/03/20 00:02:58 thorpej Exp $");
+__RCSID("$NetBSD: af_iso.c,v 1.2 2006/06/14 11:05:42 tron Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -123,7 +123,7 @@ iso_status(int force)
getsock(AF_ISO);
if (s < 0) {
- if (errno == EPROTONOSUPPORT)
+ if (errno == EAFNOSUPPORT)
return;
err(EXIT_FAILURE, "socket");
}
diff --git a/sbin/ifconfig/af_ns.c b/sbin/ifconfig/af_ns.c
index f4db228309f..826c77c7362 100644
--- a/sbin/ifconfig/af_ns.c
+++ b/sbin/ifconfig/af_ns.c
@@ -1,4 +1,4 @@
-/* $NetBSD: af_ns.c,v 1.2 2005/03/20 01:10:51 thorpej Exp $ */
+/* $NetBSD: af_ns.c,v 1.3 2006/06/14 11:05:42 tron Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: af_ns.c,v 1.2 2005/03/20 01:10:51 thorpej Exp $");
+__RCSID("$NetBSD: af_ns.c,v 1.3 2006/06/14 11:05:42 tron Exp $");
#endif /* not lint */
/*
@@ -99,7 +99,7 @@ xns_status(int force)
getsock(AF_NS);
if (s < 0) {
- if (errno == EPROTONOSUPPORT)
+ if (errno == EAFNOSUPPORT)
return;
err(EXIT_FAILURE, "socket");
}