From owner-freebsd-arch@FreeBSD.ORG Mon Sep 20 11:27:43 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C21C16A4CE for ; Mon, 20 Sep 2004 11:27:43 +0000 (GMT) Received: from burka.carrier.kiev.ua (burka.carrier.kiev.ua [193.193.193.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7E4343D58 for ; Mon, 20 Sep 2004 11:27:42 +0000 (GMT) (envelope-from netch@lucky.net) Received: from burka.carrier.kiev.ua (netch@localhost [127.0.0.1]) by burka.carrier.kiev.ua with ESMTP id i8KBRXKf016769; Mon, 20 Sep 2004 14:27:36 +0300 (EEST) (envelope-from netch@burka.carrier.kiev.ua) Received: (from netch@localhost) by burka.carrier.kiev.ua (8.12.11/8.12.11/Submit) id i8KBRXMx016765; Mon, 20 Sep 2004 14:27:33 +0300 (EEST) (envelope-from netch) Date: Mon, 20 Sep 2004 14:27:33 +0300 From: Valentin Nechayev To: Poul-Henning Kamp Message-ID: <20040920112733.GE84228@lucky.net> References: <46041.1095665925@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46041.1095665925@critter.freebsd.dk> X-42: On X-Verify-Sender: Address has been verified (burka.carrier.kiev.ua) cc: arch@freebsd.org Subject: Re: [HEADSUP] naming of tty devices. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: netch@lucky.net List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2004 11:27:43 -0000 Mon, Sep 20, 2004 at 09:38:45, phk wrote about "[HEADSUP] naming of tty devices.": > My suggestion is the following: > All drivers will offer "tty${something}" devices, and > generally ${something} will consist of a letter followed > by a number, possibly in base 36 ([0-9a-z]). There are cases when cua devices are used as login devices, and too many places where 3 first chars of device name are removed without checking them, e.g. /bin/ps: === cut === else { if (strncmp(ttname, "tty", 3) == 0 || strncmp(ttname, "cua", 3) == 0) ttname += 3; === end cut === When restoring terminal device from this name, now it is possible yet to determine terminal testing /dev/tty$x or /dev/cua$x; with your new scheme this will be impossible totally. If we suppose to remain ability of logging in via callout devices, these code pieces must be rewritten to keep "tty"/"cua", or all callout devices must be renamed to terminals. On 4.* I use the latter variant on one host: /dev/cuaa$n are renamed to /dev/ttyOd$n, n=0...3. > This results in the following major compatibility issues: > sio's cuaa* gets renamed to cuad* Basing on written above I propose /dev/ttyOd* -netch-