From fcffb59fc8d806252ccbf188c3dbd08cc1a68172 Mon Sep 17 00:00:00 2001 From: Michel Normand Date: Mon, 18 May 2009 22:11:45 +0200 Subject: [PATCH] in lxc-unshare remove log options 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 Signed-off-by: Daniel Lezcano --- src/lxc/lxc_unshare.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/lxc/lxc_unshare.c b/src/lxc/lxc_unshare.c index c380422f2..f105ef26d 100644 --- a/src/lxc/lxc_unshare.c +++ b/src/lxc/lxc_unshare.c @@ -45,8 +45,6 @@ void usage(char *cmd) "\t MOUNT, PID, UTSNAME, IPC, USER, NETWORK\n"); fprintf(stderr, "\t -u : new id to be set if -s USER is specified\n"); fprintf(stderr, "\t if -f or -s PID is specified, is mandatory)\n"); - fprintf(stderr, "\t[-o ] : path of the log file\n"); - fprintf(stderr, "\t[-l ]: 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]); -- 2.47.2