[PATCH] *kmap: behave when user misses redirection

Denys Vlasenko vda.linux at googlemail.com
Sun Jun 6 16:12:26 UTC 2010


On Saturday 05 June 2010 19:20, Lauri Kasanen wrote:
> Hi
> 
> On DESKTOP builds, don't spew binary data (dumpkmap) or wait
> indefinitely (loadkmap) if the user misses < or >.
> 
>     text    data     bss     dec     hex filename
>    13609     773      40   14422    3856 busybox.new
>    13498     765      40   14303    37df busybox.orig

This is a cheaper way to do it:

+       /* When user accidentally runs "dumpkmap FILE"
+        * instead of "dumpkmap >FILE", we'd dump binary stuff to tty.
+        * Let's prevent it: */
+       if (argv[1])
+               bb_show_usage();

-- 
vda


More information about the busybox mailing list