From owner-freebsd-audit Sun Jul 22 4: 7: 0 2001 Delivered-To: freebsd-audit@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id BB56237B403; Sun, 22 Jul 2001 04:06:48 -0700 (PDT) (envelope-from des@ofug.org) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id NAA24833; Sun, 22 Jul 2001 13:06:41 +0200 (CEST) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Bruce Evans Cc: Assar Westerlund , audit@FreeBSD.ORG Subject: Re: subf_printf warnings in linprocfs.c:linprocfs_donetdev References: From: Dag-Erling Smorgrav Date: 22 Jul 2001 13:06:41 +0200 In-Reply-To: Message-ID: Lines: 30 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bruce Evans 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