[BusyBox] rx, setterm patch

Erik Andersen andersen at codepoet.org
Thu Oct 9 08:53:50 UTC 2003

On Fri Oct 03, 2003 at 05:22:24PM -0700, Christopher Hoover wrote:
> Here's a patch against the current cvs head that adds rx (xmodem and
> xmodem-1k only) and setterm support to busybox.  rx is particularly
> useful for embedded targets, as a serial line is often the only thing
> available.
> The rx code is based on code I wrote from scratch for blob, the ARM
> bootloader.
> The setterm code is based on the standard linux-utils code.
> Please apply.

With a little bit of rework, such as integrating busybox style
error handling such as error_msg_and_die(), and using functions
available in libbb, such as full_write() instead of
write_fully(), I would be glad to apply your rx applet.

I think the setterm applet, as currently written, would not be
acceptible without being significanly rewritten.  It is rather
poorly implemented in many place and somewhat bloated still I'm
afraid.  Much of the parsing code could be implemented using
lookups into tables of key/value pairs, which would allow it to
be much more compact.  Similarly, if the ti_entry() function were
implemented as a lookup into a table of key/value pairs you would
be able to eliminate a huge number of ifdefs, making the code
much more readable.  And this applet also needs to use standard
busybox style error handling such as error_msg_and_die(), which
will also help reduce the size before it will be acceptible.


Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--

More information about the busybox mailing list