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).
My personal preference goes to the latter, but it's a matter of taste
(and convention choice)
(echo -n "keymap " ; cat keymap) > /dev/tty1/ioctl
(echo -n "font " ; cat font) > /dev/tty1/ioctl
This seems ugly to you?
> 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.
-- Abramo Bagnara mailto:abramo@alsa-project.orgOpera 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/