aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2020-08-07 02:25:50 -0500
committerRob Landley <rob@landley.net>2020-08-07 02:25:50 -0500
commitefb8060a591b6ed13c16c4034db43652e03f90d5 (patch)
treebd8d2bcb3ea994a1d9bbcf0481d8185d16c9ef2e /main.c
parent1d67afafcec61ef5e0bb743b174a450d1c4c7a1e (diff)
downloadtoybox-efb8060a591b6ed13c16c4034db43652e03f90d5.tar.gz
People have been having trouble finding the toybox web page (despite being
the first google hit for "android toybox"), and want toybox --help to mention it. I was referred to https://github.com/landley/toybox/issues/50 So add a URL to toybox --help. While I was there, make unrecognized commands (like toybox -?) suggest "toybox --help", move the install instructions to the FAQ page (with a second link from toybox --help), and generally tighten up the help text. Also, "toybox -*" is no longer a synonym for --long. Oh, and I fixed some build dependencies when Config.in changes.
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index dbb84cf4..ffa735e3 100644
--- a/main.c
+++ b/main.c
@@ -64,7 +64,7 @@ static void unknown(char *name)
{
toys.exitval = 127;
toys.which = toy_list;
- error_exit("Unknown command %s", name);
+ help_exit("Unknown command %s", name);
}
// Setup toybox global state for this command.
@@ -193,7 +193,7 @@ void toybox_main(void)
// For early error reporting
toys.which = toy_list;
- if (toys.argv[1] && toys.argv[1][0] != '-') unknown(toys.argv[1]);
+ if (toys.argv[1] && strcmp(toys.argv[1], "--long")) unknown(toys.argv[1]);
// Output list of command.
for (i = 1; i<ARRAY_LEN(toy_list); i++) {