[02/10] config: remove unused pid option

Submitted by Adrian Reber on Aug. 1, 2018, 4:31 p.m.

Details

Message ID 20180801163122.19872-3-adrian@lisas.de
State Accepted
Series "Series without cover letter"
Headers show

Commit Message

Adrian Reber Aug. 1, 2018, 4:31 p.m.
From: Adrian Reber <areber@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@redhat.com>
---
 criu/config.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Patch hide | download patch | download mbox

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)