[CRIU] [PATCH 02/10] config: remove unused pid option
Adrian Reber
adrian at lisas.de
Wed Aug 1 19:31:14 MSK 2018
From: Adrian Reber <areber at redhat.com>
This removes the code around '--pid, -p' which is not used at all. The
command-line option is still available to not break CRIU users, but as
the result has not been used, just remove the code assigning it.
Signed-off-by: Adrian Reber <areber at redhat.com>
---
criu/config.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/criu/config.c b/criu/config.c
index 2fd592139..357893050 100644
--- a/criu/config.c
+++ b/criu/config.c
@@ -354,8 +354,6 @@ int parse_options(int argc, char **argv, bool *usage_error, bool *has_exec_cmd)
{
int state = PARSING_GLOBAL_CONF;
int global_cfg_argc = 0, user_cfg_argc = 0;
- /* remove pid, unused */
- pid_t pid = 0;
int ret;
int opt;
int idx;
@@ -368,6 +366,7 @@ int parse_options(int argc, char **argv, bool *usage_error, bool *has_exec_cmd)
static const char short_opts[] = "dSsRf:F:t:p:hcD:o:v::x::Vr:jJ:lW:L:M:";
static struct option long_opts[] = {
{ "tree", required_argument, 0, 't' },
+ /* The pid option is unused and never evaluated. */
{ "pid", required_argument, 0, 'p' },
{ "leave-stopped", no_argument, 0, 's' },
{ "leave-running", no_argument, 0, 'R' },
@@ -508,11 +507,6 @@ int parse_options(int argc, char **argv, bool *usage_error, bool *has_exec_cmd)
return 1;
opts.ext_unix_sk = true;
break;
- case 'p':
- pid = atoi(optarg);
- if (pid <= 0)
- goto bad_arg;
- break;
case 't':
opts.tree_id = atoi(optarg);
if (opts.tree_id <= 0)
--
2.18.0
More information about the CRIU
mailing list