From owner-freebsd-arch@FreeBSD.ORG Mon Sep 20 14:25:38 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 A506F16A4CE for ; Mon, 20 Sep 2004 14:25:38 +0000 (GMT) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 266B543D54 for ; Mon, 20 Sep 2004 14:25:38 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.42 (FreeBSD)) id 1C9P6m-0001sH-EN; Mon, 20 Sep 2004 18:25:36 +0400 From: Vladimir Grebenschikov To: Poul-Henning Kamp In-Reply-To: <20547.1095688312@critter.freebsd.dk> References: <20547.1095688312@critter.freebsd.dk> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Mon, 20 Sep 2004 18:25:35 +0400 Message-Id: <1095690335.980.60.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov 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: vova@fbsd.ru 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 14:25:38 -0000 =F7 =D0=CE, 20/09/2004 =D7 15:51 +0200, Poul-Henning Kamp =D0=C9=DB=C5=D4: > In message <414EDF66.8030907@cronyx.ru>, Roman Kurakin writes: >=20 > >>> Why not to add some general device enumeration for all devices,=20 > >>>especially > >>>if devices would behave the same? > >>> > >>>tty%{global_port} > >>>cua%{global_port} > >> > >>This doesn't work. > >> > >>There _are_ differences between serial devices and for instance > >>PTYs or NMDM devices have very particular semantics. > >> > >but all tty devices have some generic abilities and behaviour, right? > >(Sorry, I am a bit sio-centric, I didn't ever look inside ptys.) >=20 > Yes, and those generic abilities is why I want systematic naming. >=20 > But a global numbering gives you no way to know that tty234 is a PTY > and tty235 is a USB device. As da3 do not give you any hint is it SCSI disk, USB connected memory card or firewire-connected DV-Camera. I am not vote for uniform ttys numbering, just notice about similar subsystem. Actual another problem - ttys should be allocated from userland as minimum tty/pty (in contrary with disks). One of possible solutions - different dev name-spaces=20 /dev/tty/ZXX - for generic ttys (all other ttys mapped there too) /dev/pty/XX - for pseudo-ttys /dev/sio/XX - for former ttydX /dev/cua/XX - for former cuaaX /dev/nmdm/XX - for null-modem /dev/con/XX - for console etc...=20 But this layout broke any possible compatibility and will only confuse userland (what name should be considered as primary ?) I like pkh@ idea if there still way to list all available tty devices in system. (sysctl or dev entry/directory)=20 --=20 Vladimir B. Grebenchikov vova@fbsd.ru