Date: Sat, 15 Sep 2001 11:48:11 +0200 (CEST) From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/30587: [PATCH] small fix to ifconfig output Message-ID: <200109150948.f8F9mB803604@curry.mchp.siemens.de>
next in thread | raw e-mail | index | archive | help
>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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.128.1 netmask 0xffffff00 broadcast 192.168.128.255
ether 00:02:b3:1f:25:dc
media: Ethernet 100baseTX <full-duplex>
status: active
fxp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:a0:c9:a9:1d:23
media: Ethernet manual
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet 127.0.0.1 netmask 0xff000000
With the small patch below it will be like this:
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.128.1 netmask 0xffffff00 broadcast 192.168.128.255
ether 00:02:b3:1f:25:dc
media: Ethernet 100baseTX <full-duplex>
status: active
fxp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:a0:c9:a9:1d:23
media: Ethernet manual
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109150948.f8F9mB803604>
