svn commit: trunk/busybox/libbb
Johan Adolfsson
Johan.Adolfsson at axis.com
Mon Jun 26 08:21:48 UTC 2006
> -----Original Message-----
> From: busybox-bounces at busybox.net
> [mailto:busybox-bounces at busybox.net] On Behalf Of Rob Landley
> Sent: den 26 juni 2006 02:28
> To: Johan Adolfsson
> Cc: busybox at busybox.net
> Subject: Re: svn commit: trunk/busybox/libbb
>
>
> On Sunday 25 June 2006 7:13 pm, Johan Adolfsson wrote:
>
> > > How do end users know that they can do 460800, but not 460900?
> > > Nobody has yet answered this question. End users are specifying
> > > variable baudrates for nonstandard speeds, yet they know
> what these
> > > nonstandard speeds are.
> > Where
> > > did they get them? Are they looking in bits/termios.h
> directly, or
> > > is
> > there
> > > some kind of documentation that lists "460800" which
> could also list
> > > x1004
> > as
> > > the way to get it?
> >
> > One example would be a web page where you do the
> configuration. Sure
> > you could write: <select name="baudratecode">
> > <option value="0x1004">460800</option>
> > ..
> > and waste 15 bytes for each baudrate and get something
> buttugly compared to
> > just
> > listing the available buadrates:
> > <option>460800</option>
> > - not to mention the special cases you might get for the standard
> > baudrates.
>
> So you already had a user typing in the baud rates by hand,
> but you need a web
> page built into your device to tell them what to type?
No, see below.
> > > Why? You're assuming the need for a shell script here.
> What is a
> > > use
> > case
> > > where the shell script is actually required?
> >
> > Possibly parse the above mentioned configuration page when
> submitted
> > if you don't put the special codes in the form.
>
> So you're doing it as an HTML form, but you're having them
> type numbers into
> an entry field (from a list they have to look up somehow)
> instead of having a
> pulldown menu with the available (finite and specific) options?
No, in this example no typing is needed. Just selecting from the
pulldown meny (<select>), either the HTML page (or HTML generator)
or the parser of the submitted form need to have the defines/table
which really belongs in stty.
(This is not exactly a real world example of mine - just trying to show
a possible use case where "the bloat" isn't removed - just moved around
and obfuscated making the config handling stuff harder to port/test
on other platforms instead)
If you are so worried about having some unwanted entries in a compiled
speed table, why not make all baudrates supported by stty config options?
(At least as rational as moving termbits defines somewhere else)
/Johan
More information about the busybox
mailing list