[PATCH] More baud rates for stty

Mike Frysinger vapier at gentoo.org
Thu Feb 14 20:48:21 UTC 2008


On Thursday 14 February 2008, Alessandro Rubini wrote:
> I was in need to test the high uart speeds on an ARM device with
> 2.6.19, and I noticed stty in busybox supports "only" up to 460800. So
> I got version 1.9.1 and added the higher baud rates to the speed
> table.  The resulting stty works fine on my hardware (I tested all
> values from 19200 upward) and the printk'd divisors confirm things get
> decoded fine at kernel level.
>
> The patch extends the trick already used to fit numbers in 16 bits,
> as not all values are multiples of 256.
>
> I just subscribed, so I don't know what the patch policy is
> (the site just says "send to the list"). I'll use the elsewhere-standard
> line, and I'm including here inline for comments. I also
> dropped it at ftp://gnudd.com/pub/patches/busybox-1.9.1-baudrates.patch.gz
> in case some MTA damages whitespace or whatever.

sorry to see you do all this work, but it isnt acceptable.  you cannot assume 
the value of any B* define as they are not the same across all architectures.  
POSIX does not dictact the meaning of the B* values, just their existence, 
which means any POSIX conforming implementation could define them however 
they like.

what would make sense would be to add support for the arbitrary termios speed 
handling that exists in newer kernels.  would probably have to make it a 
build time option though ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.busybox.net/pipermail/busybox/attachments/20080214/32a14070/attachment-0002.pgp 


More information about the busybox mailing list