Added support for ignoring '-g' per GNU ls, thanks to David Vrabel
[oweals/busybox.git] / echo.c
diff --git a/echo.c b/echo.c
index 2405d0ae1dd0c2b9f559a9c19a2de4934e73165e..4659e4bc627f9f07dae50515440fdc1a8489e4dd 100644 (file)
--- a/echo.c
+++ b/echo.c
 #include <stdio.h>
 
 static const char uname_usage[] =
-       "echo [-neE] [ARG ...]\n\n"
-       "Prints the specified ARGs to stdout\n\n"
+       "echo [-neE] [ARG ...]\n"
+#ifndef BB_FEATURE_TRIVIAL_HELP
+       "\nPrints the specified ARGs to stdout\n\n"
        "Options:\n"
        "\t-n\tsuppress trailing newline\n"
        "\t-e\tinterpret backslash-escaped characters (i.e. \\t=tab etc)\n"
-       "\t-E\tdisable interpretation of backslash-escaped characters\n";
+       "\t-E\tdisable interpretation of backslash-escaped characters\n"
+#endif
+       ;
 
 extern int 
 echo_main(int argc, char** argv)
@@ -93,7 +96,7 @@ echo_main(int argc, char** argv)
        if (! nflag)
                putchar('\n');
        fflush(stdout);
-       exit( 0);
+       return( 0);
 }
 
 /*-