Skip site navigation (1)Skip section navigation (2)
Date:      22 Jul 2001 13:06:41 +0200
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Assar Westerlund <assar@FreeBSD.ORG>, audit@FreeBSD.ORG
Subject:   Re: subf_printf warnings in linprocfs.c:linprocfs_donetdev
Message-ID:  <xzp8zhhrzni.fsf@flood.ping.uio.no>
In-Reply-To: <Pine.BSF.4.21.0107222016001.24964-100000@besplex.bde.org>
References:  <Pine.BSF.4.21.0107222016001.24964-100000@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <bde@zeta.org.au> writes:
> Nearby bugs:
> - the header has hard tabs in it but the string in the above printf doesn't,
>   so the string can't possibly line up with the header for all indentations.
> - the output is unreadably wide (119 columns).  This may be necessary for
>   bug for bug compatibility with Linux.  This is obfuscated at the source
>   level using ANSI string concatenation.

I think it's *supposed* to be ugly:

des@mizar:~$ uname -a
Linux mizar.ping.uio.no 2.2.16-devfs-raid-PING #3 SMP Thu Jun 8 16:24:02 CEST 2000 sparc unknown
des@mizar:~$ cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
    lo:620500533 4063952    0    0    0     0          0         0 620500533 4063952    0    0    0     0       0          0
  eth0:1735298856 38240294    0    0    0    55          0         0 4245594048 36996963    0    0    0     0       0          0
  eth1: 7932928   76539    0    0    0     0          0         0  1787616   19132    0    0    0     0       0          0
  eth2:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0

...and the source code is even uglier:

http://lxr.linux.no/source/net/core/dev.c?v=2.4.4#L1660

I'll rewrite our code a tad so it doesn't rely on ANSI string
concatenation.

DES
-- 
Dag-Erling Smorgrav - des@ofug.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzp8zhhrzni.fsf>