From: Rabih ElMasri <rabih.elmasri@infineon.com>
To: lkml <linux-kernel@vger.kernel.org>
Subject: tty line discipline
Date: Wed, 19 Oct 2005 13:55:35 +0200 [thread overview]
Message-ID: <7418fe470510190455x3bb746cax365092504e77ba3c@mail.gmail.com> (raw)
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
next reply other threads:[~2005-10-19 11:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-19 11:55 Rabih ElMasri [this message]
2005-10-19 12:01 ` Arjan van de Ven
2005-10-19 14:53 ` Rabih ElMasri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7418fe470510190455x3bb746cax365092504e77ba3c@mail.gmail.com \
--to=rabih.elmasri@infineon.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®