Re: no ioctls for serial ports? [was Re: LANANA: To Pending DeviceNumber Registrants]

Abramo Bagnara
2001-05-19T20:12:08Z

Linus Torvalds wrote:
>
> [ Attribution is gone, so I just deleted it.. ]
>
> > > > > fd = open("/dev/tty00/nonblock,9600,n8", O_RDWR);
> > > >
> > > > Hmm, there might be problem with this. How do you change speed without
> > > > reopening device? [Remember: your mice knows when you close device]
>
> The naming scheme is not a replacement for these kinds of ioctl's - it's
> just a way to make them less critical, and get people thinking in other
> directions so that we don't get _more_ ioctl's.

However
fchdir(fd);
s = open("speed");
write(s, "19200\n", 6);

would be enough to solve the problem Pavel is pointing also without the
need to use ioctl.

--
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!