diff options
author | Rob Landley <rob@landley.net> | 2015-09-11 16:35:14 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-09-11 16:35:14 -0500 |
commit | e5354ca12a232b3f97726214254a868771cb70d1 (patch) | |
tree | ba373c24ede64b8a18f11a02cf834ce99aa586bf /main.c | |
parent | d067571abb2b7934f3350c90ca891beb987c68fd (diff) | |
download | toybox-e5354ca12a232b3f97726214254a868771cb70d1.tar.gz |
Replace toys.exithelp with help_exit() in lib.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -78,7 +78,7 @@ static void toy_singleinit(struct toy_list *which, char *argv[]) if (CFG_TOYBOX_HELP_DASHDASH && argv[1] && !strcmp(argv[1], "--help")) { if (CFG_TOYBOX && toys.which == toy_list && toys.argv[2]) if (!(toys.which = toy_find(toys.argv[2]))) return; - show_help(); + show_help(stdout); xexit(); } @@ -110,10 +110,7 @@ void toy_init(struct toy_list *which, char *argv[]) } else if (CFG_TOYBOX_DEBUG && uid && which != toy_list) error_msg("Not installed suid root"); - if ((which->flags & TOYFLAG_NEEDROOT) && euid) { - toys.exithelp++; - error_exit("Not root"); - } + if ((which->flags & TOYFLAG_NEEDROOT) && euid) help_exit("Not root"); } // Free old toys contents (to be reentrant), but leave rebound if any |