Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/ifconfig ifconfig: test cases want LINK_STATE_UNKNOWN t...
details: https://anonhg.NetBSD.org/src/rev/9d8141354a90
branches: trunk
changeset: 939011:9d8141354a90
user: roy <roy%NetBSD.org@localhost>
date: Wed Sep 23 10:48:12 2020 +0000
description:
ifconfig: test cases want LINK_STATE_UNKNOWN to be treated as up.
diffstat:
sbin/ifconfig/ifconfig.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (32 lines):
diff -r 1a42e9a2a36e -r 9d8141354a90 sbin/ifconfig/ifconfig.c
--- a/sbin/ifconfig/ifconfig.c Wed Sep 23 09:56:33 2020 +0000
+++ b/sbin/ifconfig/ifconfig.c Wed Sep 23 10:48:12 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ifconfig.c,v 1.244 2020/09/23 02:09:18 roy Exp $ */
+/* $NetBSD: ifconfig.c,v 1.245 2020/09/23 10:48:12 roy Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1983, 1993\
The Regents of the University of California. All rights reserved.");
-__RCSID("$NetBSD: ifconfig.c,v 1.244 2020/09/23 02:09:18 roy Exp $");
+__RCSID("$NetBSD: ifconfig.c,v 1.245 2020/09/23 10:48:12 roy Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -1224,10 +1224,10 @@
if (direct_ioctl(env, SIOCGIFDATA, &ifdr) == -1)
return EXIT_FAILURE;
- if (ifdr.ifdr_data.ifi_link_state == LINK_STATE_UP)
+ if (ifdr.ifdr_data.ifi_link_state == LINK_STATE_DOWN)
+ return EXIT_FAILURE;
+ else
return EXIT_SUCCESS;
- else
- return EXIT_FAILURE;
}
if ((ifmr.ifm_status & IFM_AVALID) == 0) {
/*
Home |
Main Index |
Thread Index |
Old Index