From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Rodolfo Giometti <giometti@linux.it>
Cc: linux-kernel@vger.kernel.org,
Russell Coker <russell@coker.com.au>,
Greg Kroah-Hartman <gregkh@suse.de>,
Randy Dunlap <randy.dunlap@oracle.com>
Subject: Re: [PATCH 1/1] char nvtty: Network Virtual Terminal support
Date: Mon, 10 Jan 2011 13:13:32 +0000 [thread overview]
Message-ID: <20110110131332.622e8a0d@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <1294664819-17960-2-git-send-email-giometti@linux.it>
> By using these devices and a proper compatible server (not included
> here but you can use sredird) you can get access to a remote tty
> device as the tty device itself was conneted with your local host.
> All data and settings are sent and received through the network.
And this is still something that should be done in userspace if necessary
by fixing up the tty layer to support pty/tty pair modem lines and
termios change reporting, or some kind of *generic* vt that can also
expose all the config other net protocols might need.
> + default:
> + tty->termios->c_cflag = B0;
This btw is wrong - if you don't recognize the baud rate you want to
force a new one. Also you shouldn't be writing all of c_cflag here just
the baud bits, also you shouldn't in fact ever be hand mangling the baud
bits but using the helpers.
> + }
> +}
> +#undef TEST_SET_BAUDRATE
> +
> +#define TEST_SET_DATASIZE(b) case b: tty->termios->c_cflag |= CS ## b ; break
> +static void nvtty_set_datasize(struct nvtty_serial *info, unsigned int datasize)
> +{
> + struct tty_struct *tty = info->tty;
> +
> + nvtty_dbg(info, "datasize=%d", datasize);
> +
> + tty->termios->c_cflag &= ~CSIZE;
> + switch (datasize) {
> + TEST_SET_DATASIZE(5);
> + TEST_SET_DATASIZE(6);
> + TEST_SET_DATASIZE(7);
> + TEST_SET_DATASIZE(8);
> + default:
> + tty->termios->c_cflag = CS5;
Should be |=
>
> +static void nvtty_set_parity(struct nvtty_serial *info, unsigned int parity)
> +{
> + struct tty_struct *tty = info->tty;
> +
> + nvtty_dbg(info, "parity=%d", parity);
> +
> + tty->termios->c_cflag &= ~(PARENB | PARODD);
Needs to consider the CMSPAR bit.
Otherwise its a very nice implementation of something I don't think we
should have implemented in the kernel.
next prev parent reply other threads:[~2011-01-10 13:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-10 13:06 [Ver. 2] Network Virtual Terminal Rodolfo Giometti
2011-01-10 13:06 ` [PATCH 1/1] char nvtty: Network Virtual Terminal support Rodolfo Giometti
2011-01-10 13:13 ` Alan Cox [this message]
2011-01-10 13:30 ` Rodolfo Giometti
2011-01-10 13:49 ` Alan Cox
2011-01-10 15:55 ` Greg KH
2011-01-10 13:19 ` Rodolfo Giometti
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=20110110131332.622e8a0d@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=giometti@linux.it \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=russell@coker.com.au \
/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