Error reporting fix for sulogin, plus remove help entries for options we never
authorRob Landley <rob@landley.net>
Mon, 11 Sep 2006 00:34:01 +0000 (00:34 -0000)
committerRob Landley <rob@landley.net>
Mon, 11 Sep 2006 00:34:01 +0000 (00:34 -0000)
implemented.  (Plus a bit more of bbsh leaking in from my tree, but it
shouldn't hurt anything and I'm lazy...)

include/usage.h
loginutils/sulogin.c

index a1ba0a282be6e9eb865cda2b3123ea5626383ea6..7ebd660acfdb6697c7da4507e843fc4ffaf3d7cc 100644 (file)
 #define bbconfig_full_usage \
        "Print the config file which built busybox"
 
+#define bbsh_trivial_usage \
+       "[FILE]...\n" \
+       "or: bbsh -c command [args]..."
+#define bbsh_full_usage \
+       "The bbsh shell (command interpreter)"
+
 #define cp_trivial_usage \
        "[OPTION]... SOURCE DEST"
 #define cp_full_usage \
@@ -2811,9 +2817,7 @@ USE_FEATURE_START_STOP_DAEMON_FANCY( \
 #define sulogin_full_usage \
        "Single user login\n" \
        "Options:\n" \
-       "\t-f\tDo not authenticate (user already authenticated)\n" \
-       "\t-h\tName of the remote host for this login\n" \
-       "\t-p\tPreserve environment"
+       "\t-t\tTimeout"
 
 #define sum_trivial_usage \
        "[rs] [files...]"
index fef3760e99dbaebdd9cc7868a1b21f44ba9114c8..a2238d49dd3d7f02c3d31d5754a03c403579172f 100644 (file)
@@ -55,8 +55,8 @@ int sulogin_main(int argc, char **argv)
        if (argv[optind]) {
                close(0);
                close(1);
-               close(2);
                dup(xopen(argv[optind], O_RDWR));
+               close(2);
                dup(0);
        }