Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/ifconfig Fix a buglet that caused media-specific option...



details:   https://anonhg.NetBSD.org/src/rev/08dbb746e53f
branches:  trunk
changeset: 481243:08dbb746e53f
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Tue Jan 25 06:11:25 2000 +0000

description:
Fix a buglet that caused media-specific options to *always* be printed, even if
they were not set.

diffstat:

 sbin/ifconfig/ifconfig.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r a660e379989d -r 08dbb746e53f sbin/ifconfig/ifconfig.c
--- a/sbin/ifconfig/ifconfig.c  Tue Jan 25 06:11:00 2000 +0000
+++ b/sbin/ifconfig/ifconfig.c  Tue Jan 25 06:11:25 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ifconfig.c,v 1.66 2000/01/25 02:16:57 thorpej Exp $    */
+/*     $NetBSD: ifconfig.c,v 1.67 2000/01/25 06:11:25 mycroft Exp $    */
 
 /*-
  * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
 #if 0
 static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
 #else
-__RCSID("$NetBSD: ifconfig.c,v 1.66 2000/01/25 02:16:57 thorpej Exp $");
+__RCSID("$NetBSD: ifconfig.c,v 1.67 2000/01/25 06:11:25 mycroft Exp $");
 #endif
 #endif /* not lint */
 
@@ -1218,7 +1218,7 @@
        for (desc = ifm_option_descriptions; desc->ifmt_string != NULL;
             desc++) {
                if (IFM_TYPE_MATCH(desc->ifmt_word, ifmw) &&
-                   (ifmw & desc->ifmt_word) != 0 &&
+                   (ifmw & IFM_OPTIONS(desc->ifmt_word)) != 0 &&
                    (seen_option & IFM_OPTIONS(desc->ifmt_word)) == 0) {
                        if (seen_option == 0)
                                printf(" %s", as_syntax ? "mediaopt " : "");



Home | Main Index | Thread Index | Old Index