tty line discipline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

I am trying to assign a new line discipline to ttyS0 from within the
kernel-space. During the initialization of my module I do the
following:

fp=filp_open(dev,O_RDWR | O_NOCTTY,0);
tty=fp->private_data;  //the tty_struct

then I initialize the fields of the new line discipline (ldisc). and
assign it to the tty_struct:

tty->ldisc=ldisc;

It works fine the first time I insert the module, but gets problems
with tty->count if I insert it again.

I tried to call the tty_ioctl function of tty_io.c (with flag
TIOCSETD) using the corresponding field in the file structure
(fp->f_op->ioctl(..)), but it seems to expect a call from user-space,
and returns -EFAULT due to the get_user macro.

I would really appreciate it if someone can tell me how to deal with
this problem.

Regards,
Rabih
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux