lkml.org 
[lkml]   [2009]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] jsm: fixing termios structure to be compatible with stty application
> +
> + termios->c_ispeed = termios->c_cflag & CBAUD;
> + termios->c_ospeed = termios->c_cflag & CBAUD;
> +

NAK

termios->c_ispeed/ospeed are the actual baud rates not bit encodings, and
are used for devices that support arbitary speeds

Use

tty_termios_encode_baudrate(termios, ispeed, ospeed);

where ispeed/ospeed are actual input and output baud.

It does all the hard work and knows about

- keeping requests for traditional style B38400 type requests in their
native form (so a request for 38400 that comes out at 38100 will still
get encoded as B38400)
- Encoding arbitary rates using BOTHER
- Handling platforms that haven't been updated properly.


The patch you posted is a nonsense patch so if it helps it might be worth
looking harder as to why..

Alan


\
 
 \ /
  Last update: 2009-09-30 22:33    [W:0.031 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site