From owner-freebsd-bugs Sat Sep 15 2:50:23 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B60E837B40D for ; Sat, 15 Sep 2001 02:50:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8F9o1t35599; Sat, 15 Sep 2001 02:50:01 -0700 (PDT) (envelope-from gnats) Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by hub.freebsd.org (Postfix) with ESMTP id 9A24437B40F for ; Sat, 15 Sep 2001 02:48:13 -0700 (PDT) Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by david.siemens.de (8.11.6/8.11.6) with ESMTP id f8F9mCS06093 for ; Sat, 15 Sep 2001 11:48:12 +0200 (MET DST) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) by mail2.siemens.de (8.11.6/8.11.6) with ESMTP id f8F9mB013628 for ; Sat, 15 Sep 2001 11:48:11 +0200 (MET DST) Received: (from localhost) by curry.mchp.siemens.de (8.11.6/8.11.6) id f8F9mBL94706 for FreeBSD-gnats-submit@freebsd.org; Sat, 15 Sep 2001 11:48:11 +0200 (CEST) Message-Id: <200109150948.f8F9mB803604@curry.mchp.siemens.de> Date: Sat, 15 Sep 2001 11:48:11 +0200 (CEST) From: Andre Albsmeier To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/30587: [PATCH] small fix to ifconfig output Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 30587 >Category: bin >Synopsis: [PATCH] small fix to ifconfig output >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Sep 15 02:50:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Andre Albsmeier >Release: FreeBSD 4.4-STABLE i386 >Organization: >Environment: System: FreeBSD 4.4-STABLE #0: Sat Sep 15 10:36:26 CEST 2001 >Description: ifconfig -a inserts a blank line in output if interface isn't active: fxp0: flags=8843 mtu 1500 inet 192.168.128.1 netmask 0xffffff00 broadcast 192.168.128.255 ether 00:02:b3:1f:25:dc media: Ethernet 100baseTX status: active fxp1: flags=8843 mtu 1500 inet 146.254.1.172 netmask 0xffffff00 broadcast 146.254.1.255 ether 00:a0:c9:a9:1d:06 media: Ethernet manual fxp2: flags=8843 mtu 1500 ether 00:a0:c9:a9:1d:23 media: Ethernet manual lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 With the small patch below it will be like this: fxp0: flags=8843 mtu 1500 inet 192.168.128.1 netmask 0xffffff00 broadcast 192.168.128.255 ether 00:02:b3:1f:25:dc media: Ethernet 100baseTX status: active fxp1: flags=8843 mtu 1500 inet 146.254.1.172 netmask 0xffffff00 broadcast 146.254.1.255 ether 00:a0:c9:a9:1d:06 media: Ethernet manual fxp2: flags=8843 mtu 1500 ether 00:a0:c9:a9:1d:23 media: Ethernet manual lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 >How-To-Repeat: do an ifconfig -a on a machine with inactive interfaces >Fix: The patch for -STABLE is: --- sbin/ifconfig/ifmedia.c.ORI Sat Sep 15 11:42:10 2001 +++ sbin/ifconfig/ifmedia.c Sat Sep 15 11:42:27 2001 @@ -168,9 +168,8 @@ printf("no carrier"); break; } + putchar('\n'); } - - putchar('\n'); if (ifmr.ifm_count > 0 && supmedia) { printf("\tsupported media:\n"); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message