]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
in lxc-unshare remove log options
authorMichel Normand <normand@fr.ibm.com>
Mon, 18 May 2009 20:11:45 +0000 (22:11 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Mon, 18 May 2009 20:11:45 +0000 (22:11 +0200)
remove the -o and -l log options in src/lxc-unshared.c
because these are useless for such a basic test command.
It is sufficient to report the error to stderr.

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc_unshare.c

index c380422f21953028adb593119bd99906a55039c5..f105ef26df022140840c54658402dc4dde8fb17b 100644 (file)
@@ -45,8 +45,6 @@ void usage(char *cmd)
                        "\t           MOUNT, PID, UTSNAME, IPC, USER, NETWORK\n");
        fprintf(stderr, "\t -u <id> : new id to be set if -s USER is specified\n");
        fprintf(stderr, "\t if -f or -s PID is specified, <command> is mandatory)\n");
-       fprintf(stderr, "\t[-o <logfile>]    : path of the log file\n");
-       fprintf(stderr, "\t[-l <logpriority>]: log level priority\n");
        _exit(1);
 }
 
@@ -133,12 +131,11 @@ int main(int argc, char *argv[])
        int ret;
        char *namespaces = NULL;
        char **args;
-       const char *log_file = NULL, *log_priority = NULL;
        long flags = 0;
        uid_t uid = -1; /* valid only if (flags & CLONE_NEWUSER) */
        pid_t pid;
 
-       while ((opt = getopt(argc, argv, "fs:u:o:l:")) != -1) {
+       while ((opt = getopt(argc, argv, "fs:u:")) != -1) {
                switch (opt) {
                case 's':
                        namespaces = optarg;
@@ -150,20 +147,11 @@ int main(int argc, char *argv[])
                case 'f':
                        hastofork = 1;
                        break;
-               case 'o':
-                       log_file = optarg;
-                       break;
-               case 'l':
-                       log_priority = optarg;
-                       break;
                }
        }
 
        args = &argv[optind];
 
-       if (lxc_log_init(log_file, log_priority, basename(argv[0])))
-               return 1;
-
         ret = lxc_fill_namespace_flags(namespaces, &flags);
        if (ret)
                usage(argv[0]);