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

From: Abramo Bagnara (abramo@alsa-project.org)
Date: Sat May 19 2001 - 15:11:41 EST


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



This archive was generated by hypermail 2b29 : Wed May 23 2001 - 21:00:34 EST