mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-12 09:50:59 +00:00
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 <normand@fr.ibm.com> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
parent
4c200d12e0
commit
fcffb59fc8
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user