From owner-svn-src-all@FreeBSD.ORG Tue May 20 17:16:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00D22A16; Tue, 20 May 2014 17:16:19 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 788B02BBB; Tue, 20 May 2014 17:16:18 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.8/8.14.8) with ESMTP id s4KHGDE1028743 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 20 May 2014 21:16:13 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.8/8.14.8/Submit) id s4KHGDhR028742; Tue, 20 May 2014 21:16:13 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 20 May 2014 21:16:13 +0400 From: Gleb Smirnoff To: Bruce Evans Subject: Re: svn commit: r266423 - in head/sys: conf dev/i40e modules/i40e Message-ID: <20140520171613.GM50679@FreeBSD.org> References: <201405190121.s4J1L3qA068339@svn.freebsd.org> <53796149.8060000@freebsd.org> <20140520223516.R2836@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140520223516.R2836@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Rui Paulo , Jack F Vogel , Julian Elischer X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2014 17:16:20 -0000 On Tue, May 20, 2014 at 11:40:01PM +1000, Bruce Evans wrote: B> Also, verbose names break formatting. E.g., netstat -r has 5 columns B> available under Netif for the driver name and device number. netstat B> -i has about the same under Name (possibly 1 or 2 not directly under B> Name, but reserved for the Name column). systat has 3 columns B> available, but with a more flexible format that truncates other info. B> All driver name+numbers are broken now on freefall: We must admit that nowadays 80x25 terminal is not enough :( Would be cool if most of tools (netstat, systat, etc...) could determine size of terminal and dynamically widen all their fields. Thus, tool can run w/o any abbreviations when run in a script mode, run abbreviated on a small terminal, and run verbose on a wide terminal. This sounds like a generic library providing a special version of printf(3), which specifies minimal and maximum sizes for fields and when extra terminal width is available it distributes this width evenly between all fields. Name it 'elastic printf'. Sounds like a nice Google SoC project. Or might be that such library already exists. -- Totus tuus, Glebius.