[CRIU] [PATCH] config: Remove -c -f -F and -p options

Radostin Stoyanov rstoyanov1 at gmail.com
Wed Aug 29 14:24:41 MSK 2018


The -c and -f options were introduced on December 2011 with

  commit 485c4b50d137174c8fc66ec3a7761b4f7c4e9f8c
  show: Rework show procedure

  Added

   - ability to parse every single file crtools
     understands via magic number

   - dumped memory pages can be rendered in two
     modes -- as a simple set of pages' virtual addresses
     or in hexdummp fashion (via -c command line key).

  For example

  ./crtools -s -c -f pages-2557.img

  CR_FD_PAGES: pages-2557.img
  ----------------------------------------
      7fffb44ace20: 00 00 00 00 00 00 00 00  00 00 00 74 65 73 74 2f  |. . . . . . . .  . . . t e s t / |
      7fffb44ace30: 74 65 73 74 2d 73 69 67  61 63 74 69 6f 6e 00 48  |t e s t - s i g  a c t i o n . H |
      7fffb44ace40: 4f 53 54 4e 41 4d 45 3d  6c 6f 63 61 6c 68 6f 73  |O S T N A M E =  l o c a l h o s |
      7fffb44ace50: 74 2e 6c 6f 63 61 6c 64  6f 6d 61 69 6e 00 54 45  |t . l o c a l d  o m a i n . T E |

The -p/--pid option was added on April 2013 with

  commit 73d7e283a7bd55872e569735d4055e06fe886689
  show: Filter -D output with --pid option

  Show only image info relevant to given pid. Also reuse
  the introduced --pid argument for exec action.

And the -F option was introduced on December 2013 with

  commit 7ab8a3261b5b6f2404155a397dd3950fb7a67c8f
  show: Implement simple images filtering

  The -F|--fields option specifies which fields (by name, comma
  separated) should be printed.

  For nested fields all names in path should be specified.

All four options were used in combination with the deprecated --show
command which has been decommissioned on February 2016 with

  commit a501b4804b3c95e1d83d64dd10ed95c37f0378bb
  show: Remove deprecated code

  The 'show' action has been deprecated since 1.6, let's finally drop it.

  The print_data() routine is kept for yet another (to be deprecated too)
  feature called 'criu exec'.

Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
---
 criu/config.c             | 10 +---------
 criu/include/cr_options.h |  1 -
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/criu/config.c b/criu/config.c
index 84d6aad1..b49eb873 100644
--- a/criu/config.c
+++ b/criu/config.c
@@ -418,19 +418,14 @@ int parse_options(int argc, char **argv, bool *usage_error,
 		{OPT_NAME, no_argument, SAVE_TO, true},\
 		{"no-" OPT_NAME, no_argument, SAVE_TO, false}
 
-	static const char short_opts[] = "dSsRf:F:t:p:hcD:o:v::x::Vr:jJ:lW:L:M:";
+	static const char short_opts[] = "dSsR:t:hD: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'	},
 		BOOL_OPT("restore-detached", &opts.restore_detach),
 		BOOL_OPT("restore-sibling", &opts.restore_sibling),
 		BOOL_OPT("daemon", &opts.restore_detach),
-		{ "contents",			no_argument,		0, 'c'	},
-		{ "file",			required_argument,	0, 'f'	},
-		{ "fields",			required_argument,	0, 'F'	},
 		{ "images-dir",			required_argument,	0, 'D'	},
 		{ "work-dir",			required_argument,	0, 'W'	},
 		{ "log-file",			required_argument,	0, 'o'	},
@@ -567,9 +562,6 @@ int parse_options(int argc, char **argv, bool *usage_error,
 			if (opts.tree_id <= 0)
 				goto bad_arg;
 			break;
-		case 'c':
-			opts.show_pages_content	= true;
-			break;
 		case 'r':
 			SET_CHAR_OPTS(root, optarg);
 			break;
diff --git a/criu/include/cr_options.h b/criu/include/cr_options.h
index 44588fce..8c78d541 100644
--- a/criu/include/cr_options.h
+++ b/criu/include/cr_options.h
@@ -67,7 +67,6 @@ struct cr_options {
 	int			final_state;
 	int			check_extra_features;
 	int			check_experimental_features;
-	bool			show_pages_content;
 	union {
 		int		restore_detach;
 		bool		daemon_mode;
-- 
2.17.1



More information about the CRIU mailing list