From e5354ca12a232b3f97726214254a868771cb70d1 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 11 Sep 2015 16:35:14 -0500 Subject: Replace toys.exithelp with help_exit() in lib. --- main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 0738a178..dcd486eb 100644 --- a/main.c +++ b/main.c @@ -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 -- cgit v1.2.3