[BusyBox] bug#1117: Correct my stty in recovery_mode

Vladimir N. Oleynik dzo at simtreas.ru
Sun Mar 4 12:08:00 UTC 2001


Mark,

Time the concrete problem is eliminated, the further reasonings I think better
to transfer to the basic maillist.  

> Vladimir, I have applied your patch. It patched and compiled cleanly. I have
> committed the changes to CVS.
> 
> I do have a few requests for the future, however.
> 
>  - Your patch included both whitespace / formatting modifications as well as
>    the bug fix code. In the future, I would appreciate if you would seperate
>    these into two seperate patches. (Maybe call them stty-whitespace.patch and
>    stty-bugfix.patch, or something like that.) With the two things
>    intermingled it makes it more difficult to see what bug your patch is
>    trying to fix.

 The basic problem was that the utility was placed in CVS in the changed kind on
a subject whitespace/formatting. As it was carried out with use programm some
moments have turned out very badly for reading by the mans.
Any spaces began to have the majority of lines of comments ;)
I can not work above a problem when viewing of the text of the program of me
irritates.

See addition example: my cmdedit.c in CVS lines 1010-1013. Cursedly :(

So yours changes without consultation of the author real substantiations have my
discontent under themselves.  

>  - If you need to keep your test program at the bottom (the one in the #ifdef
>    TEST block), that's fine, but if you don't need it, I would prefer that it
>    be removed.

 I think, it is time to make with it something. 
It is the basic theme why I have taken out in general maillist.  

Listen:

1) any_applet -> busybox.h -> Config.h -> applets.h
2) any_applet -> utilites.c -> messages.c -> loop.h (sic!)
3) utilites.c -> busybox.c (variable applet_name), + usage...

While we have not made libbusybox, I think too it is possible to make some
changes, simplifying standalone testing.

1) move declare applet_name from busybox.c to utilites.c with

#ifdef TEST
const char * applet_name = "applet_in_test_mode";
#else
const char * applet_name;
#endif

2) My complex patch you ignores. Ok. Listen idea in hand patch to utilites.c:

+#if !defined(USE_SYSTEM_PWD_GRP) && !defined(TEST)
 #include "pwd_grp/pwd.h"
 #include "pwd_grp/grp.h"
+#else
+#include <pwd.h>
+#include <grp.h>
+#endif


3) I do not like idea with messages.c. For example we have good idea in
glibc for internacional translation: bindtextdomain(). We can emulate this.

4) The new patch to (show_)usage() is made in view of strong optimization on 
the size.  ( Remember old dispute about bsearch? ;)) ) 
Well. But let's make an opportunity of everyone applet to have an opportunity to
comprise text of the "Usage: bla-bla", and file for all applet usage_msgs 
to generate with programm.

>  - Please keep / put braces around blocks even if they contain just one
>    statement. The reason for doing this is given in the style guide
>    (docs/style-guide.txt). The for blocks on lines 585 and 596 are examples of
>    places that should have braces around them. This isn't a big deal, just a
>    convention we've adopted.

Ok, in next time :))
 
> I will close this bug now.
> 
> Thanks,

Thanks.


--w
vodz





More information about the busybox mailing list