aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-05-25 12:56:56 -0500
committerRob Landley <rob@landley.net>2016-05-25 12:56:56 -0500
commit9c3789aed19ab8a0f2de58ff091c1e834e4cb8d9 (patch)
tree182bed52189d20895a1e925d42ebd07627078490
parentf82c739dee7fc3015b704d5d045726c3e70b02aa (diff)
downloadtoybox-9c3789aed19ab8a0f2de58ff091c1e834e4cb8d9.tar.gz
Stand alone builds of OLDTOY should show help text for corresponding NEWTOY.
-rw-r--r--lib/help.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/help.c b/lib/help.c
index 9ff575bc..87a3df94 100644
--- a/lib/help.c
+++ b/lib/help.c
@@ -10,7 +10,11 @@ void show_help(FILE *out) {;}
#undef NEWTOY
#undef OLDTOY
#define NEWTOY(name,opt,flags) HELP_##name "\0"
+#if CFG_TOYBOX
#define OLDTOY(name,oldname,flags) "\xff" #oldname "\0"
+#else
+#define OLDTOY(name, oldname, flags) HELP_##oldname "\0"
+#endif
static char *help_data =
#include "generated/newtoys.h"
;
@@ -25,11 +29,6 @@ void show_help(FILE *out)
while (i--) s += strlen(s) + 1;
// If it's an alias, restart search for real name
if (*s != 255) break;
- if (!CFG_TOYBOX) {
- s = xmprintf("See %s --help\n", ++s);
-
- break;
- }
i = toy_find(++s)-toy_list;
}