Messages in this thread |  | | Date | Sun, 20 May 2001 17:40:25 +0200 | From | Abramo Bagnara <> | Subject | Re: no ioctls for serial ports? [was Re: LANANA: To Pending DeviceNum |
| |
Alexander Viro wrote: > > On Sun, 20 May 2001, Abramo Bagnara wrote: > > > > Face it, we _already_ have more than one side band. > > > > This does not imply it's necessarily a good idea. > > We are comparing > > > > echo "9600" > /proc/self/fd/0/speed (or /dev/ttyS0/speed) > > echo "8" > /proc/self/fd/0/bits (or /dev/ttyS0/bits) > > > > with > > > > echo -e "speed 9600\nbits 8" > /proc/self/fd/0/ioctl (or > > /dev/ttyS0/ioctl). > > How about reading from them? You are forcing restriction that may make > sense in some cases, but doesn't look good for everything.
exec 3>/dev/ttyS0/ioctl exec 4<&3 echo "speed" >&3 cat <&4 exec 3>&- exec 4<&-
Can you make a counter example where this doesn't look good?
> > > > Moreover, we have channels that are not tied to a particular device - > > > they are for a group of them. Example: setting timings for IDE controller. > > > Sure, we can just say "open /dev/hda instead of /dev/hda5", but then we > > > are back to the "find related file" problem you tried to avoid. > > > > It does not seems appropriate to permit to change IDE timings using an > > handle to a partition... nor it seems very safe under a permissions > > point of view. > > However, we _do_ allow that. Right now. And yes, I agree that we should > go to separate file for that. And we are right back to finding a related > file.
I'd prefer to make what you often call a crapectomy: no IDE timing change using a partition handle. It's something like to permit that on a LVM handle, it's stupid...
About tty and vcs split: there the problem is more subtle and it's related to a missing separation of keyboard and screen. After to have done this choice (i.e. to have the some behaviour of serial port) someone has realized that to read from console screen it's a sensible action (to fetch current content).
This is the typical case where to have /dev/tty1/ioctl does not substitute to have another device for console screen reading.
Note that it's a *different* device (different permission, etc.).
-- Abramo Bagnara mailto:abramo@alsa-project.org
Opera Unica Phone: +39.546.656023 Via Emilia Interna, 140 48014 Castel Bolognese (RA) - Italy
ALSA project http://www.alsa-project.org It sounds good! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |