Re: Problem with tcgetattr
From: Laurent H. (l.huge_at_nospam.wanadoo.fr)
Date: 09/07/03
- Next message: Peter T. Breuer: "Re: Problem with tcgetattr"
- Previous message: Min,Lee: "stream IO subsystem?"
- In reply to: Peter T. Breuer: "Re: Problem with tcgetattr"
- Next in thread: Peter T. Breuer: "Re: Problem with tcgetattr"
- Reply: Peter T. Breuer: "Re: Problem with tcgetattr"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 07 Sep 2003 20:52:48 +0200
Peter T. Breuer a écrit :
> The struct is defined in tty_ldisc.h. And yes, you need an ioctl
> function.
> * int (*ioctl)(struct tty_struct * tty, struct file * file,
> * unsigned int cmd, unsigned long arg);
> *
> * Note that the search order for ioctls is (1) tty
> * layer, (2) tty low-level driver, (3) line discpline. So a
> * low-level driver can "grab" an ioctl request before the line
> * discpline has a chance to see it.
I've read the same thing, and understood that the tty_driver of the
serial module would have cope with line parameters.
> and it's a field of your struct that you forgot to initialize and
> which might be any old random thing ...
Since I don't initialize it, it is pointing to NULL. And tty_ldisc.h
also tell that :
* The following routines can be
* defined; unless noted otherwise, they are optional, and can be
* filled in with a null pointer.
Anyway, I've implemented a fake ioctl (doing nothing !) and it proves
that it is called by the ioctl of TCGET (which to my opinion means
that neither the tty layer nor the tty_driver has coped with it). So
I'm going to dive into the secrets of ioctl and tell you as soon as
possible the results of my searches.
Thanks for your help.
-- Laurent H. (pour m'écrire, enlever nospam de l'adresse de réponse)
- Next message: Peter T. Breuer: "Re: Problem with tcgetattr"
- Previous message: Min,Lee: "stream IO subsystem?"
- In reply to: Peter T. Breuer: "Re: Problem with tcgetattr"
- Next in thread: Peter T. Breuer: "Re: Problem with tcgetattr"
- Reply: Peter T. Breuer: "Re: Problem with tcgetattr"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]