From efb8060a591b6ed13c16c4034db43652e03f90d5 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 7 Aug 2020 02:25:50 -0500 Subject: 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. --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.c') 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