[illumos-Developer] cfmakeraw (was: First Illumos patches)
Andrew Stormont
andrew.stormont at nexenta.com
Sun Jun 12 12:26:50 PDT 2011
Hi Cyril,
No reason. I just didn't think it was necessary.
I will update the patch to set c_cc[VMIN] and c_cc[VTIME] if you think
it's a good idea.
Thanks,
Andy
On 12/06/2011 10:19, "Cyril Plisko" <cyril.plisko at mountall.com> wrote:
>On Wed, Jun 8, 2011 at 8:33 PM, Andrew Stormont
><andrew.stormont at nexenta.com> wrote:
>> Hi Cyril,
>>
>> Yes I forgot to add the file. Patch attached should be good.
>
>
>Andy,
>
>sorry it took me some time to get to review.
>
>I only looked at cfmakeraw.c
>
>+/*
>+ * set the structure pointed to by termios_p to raw mode
>+ */
>+
>+void
>+cfmakeraw(struct termios *termios_p)
>+{
>+ termios_p->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
>+ |INLCR|IGNCR|ICRNL|IXON);
>+ termios_p->c_oflag &= ~OPOST;
>+ termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
>+ termios_p->c_cflag &= ~(CSIZE|PARENB);
>+ termios_p->c_cflag |= CS8;
>+}
>
>You are not touching c_cc[VMIN] and c_cc[VTIME] fields. Is it on purpose ?
>
>For raw mode I am usually setting it to:
>
>c_cc[VMIN] = 1;
>c_cc[VTIME] = 0;
>
>--
>Regards,
> Cyril
More information about the Developer
mailing list