aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2020-01-03 03:31:55 -0600
committerRob Landley <rob@landley.net>2020-01-03 03:31:55 -0600
commit440328edfcf65f29b69f9069517b7192e026c187 (patch)
treedec00eb2218c4409694227e5584ea060be572400
parenta2cd46a5f342553c05ae6ef4e7a73069df0e1be1 (diff)
downloadtoybox-440328edfcf65f29b69f9069517b7192e026c187.tar.gz
No, optflags gets cleared by toy_init(), use toys.rebound instead.
-rw-r--r--lib/lib.h1
-rw-r--r--toys/other/help.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/lib.h b/lib/lib.h
index 398d261d..9e933401 100644
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -55,7 +55,6 @@ struct num_cache *add_num_cache(struct num_cache **cache, long long num,
// args.c
#define FLAGS_NODASH (1LL<<63)
-#define FLAGS_BUILTIN (1LL<<62)
void get_optflags(void);
// dirtree.c
diff --git a/toys/other/help.c b/toys/other/help.c
index eba3cb1e..3ac4f128 100644
--- a/toys/other/help.c
+++ b/toys/other/help.c
@@ -51,7 +51,7 @@ void help_main(void)
int i;
// If called with no arguments as a builtin form the shell, show all builtins
- if (!*toys.optargs && (toys.optflags&FLAGS_BUILTIN)) {
+ if (!*toys.optargs && toys.rebound) {
for (i = 0; i < toys.toycount; i++) {
if (!(toy_list[i].flags&(TOYFLAG_NOFORK|TOYFLAG_MAYFORK))) continue;
toys.which = toy_list+i;