Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Sep 2004 19:48:15 +0400
From:      Roman Kurakin <rik@cronyx.ru>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        arch@freebsd.org
Subject:   Re: [HEADSUP] naming of tty devices.
Message-ID:  <414EFBBF.3050108@cronyx.ru>
In-Reply-To: <20547.1095688312@critter.freebsd.dk>
References:  <20547.1095688312@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote:

>In message <414EDF66.8030907@cronyx.ru>, Roman Kurakin writes:
>  
>
>>>>  Why not to add some general device enumeration for all devices, 
>>>>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.)
>>    
>>
>Yes, and those generic abilities is why I want systematic naming.
>  
>
So if software do not want to know peculiarities, it is enough to it to use
ttyXYZ and do not distinguish between various devices.

I believe this might be useful for simplicity of management of software.
If we use a set of various hardware for same functions, it would be easy
to write one template and a range of ttyXYZs for which it would be applied.

>But a global numbering gives you no way to know that tty234 is a PTY
>and tty235 is a USB device.
>  
>
But if software wants to it may ask its real name or type or whatever.

 From the other hand symlink or alias for device and ioctl "tell
me who you are" could do the same.

PS. This all not more than just some ideas about what might be useful.

rik





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?414EFBBF.3050108>