From owner-freebsd-hackers Wed Jul 5 03:09:20 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id DAA15635 for hackers-outgoing; Wed, 5 Jul 1995 03:09:20 -0700 Received: from hq.icb.chel.su (icb-rich-gw.icb.chel.su [193.125.10.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id DAA15603 for ; Wed, 5 Jul 1995 03:08:43 -0700 Received: from localhost (babkin@localhost) by hq.icb.chel.su (8.6.5/8.6.5) id QAA13544; Wed, 5 Jul 1995 16:06:20 +0600 From: "Serge A. Babkin" Message-Id: <199507051006.QAA13544@hq.icb.chel.su> Subject: Re: tty names longer than two meaningful characters.. To: peter@haywire.DIALix.COM (Peter Wemm) Date: Wed, 5 Jul 1995 16:06:20 +0600 (GMT+0600) Cc: hackers@freebsd.org In-Reply-To: from "Peter Wemm" at Jul 5, 95 05:29:21 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 1513 Sender: hackers-owner@freebsd.org Precedence: bulk > Things like ps, w, etc tend to truncate them to two letters after the > "tty" part. > > I've been thinking about going through and finding and extending the > limits. Does anybody have any particular preference on how this is done? I have just looked at SCO ps and found that it's done enough good in it. It leaves some fixed space for tty name, but doesn't fix its lengh, like "%7s" printf format, so in the case when the name is too long the string with it is shifted related to the header but shows the tty name right. But SCO doesn't cares to fit in 80 characters. > My initial thoughts were to expand the two letters to either three or > four. If there are 4, then "tty1234" is a total of 7 characters, plus > the NULL, to fit into the 8 characters in utmp.ut_line[8]. I think 3 will be enough. With one change: it should print not 3 characters after the word `tty' but 3 last characters, then in case of 4-character names the first character can be guessed. > What I guess is important, is: > 1) Do people want larger tty columns? Yes. > 2) How much larger? 1 or 2 extra characters? 1 > 3) as a corollary to #2, how many characters are people prepared to give > up on 80 column displays? ps -u (for example) is pretty tight.. Really ps leaves 3 characters for tty name (run something in background from rc.local and you'll see that its tty is shown as `??-'). Serge Babkin ! (babkin@hq.icb.chel.su) ! Headquarter of Joint Stock Commercial Bank "Chelindbank" ! Chelyabinsk, Russia