Commit ae758dc7 authored by Radostin Stoyanov's avatar Radostin Stoyanov Committed by Andrei Vagin

config: Remove -c -f -F and -p options

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

  commit 485c4b50
  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 73d7e283
  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 7ab8a326
  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 a501b480
  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: 's avatarRadostin Stoyanov <rstoyanov1@gmail.com>
Acked-by: 's avatarAdrian Reber <areber@redhat.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 3ce615ca
......@@ -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' },
......@@ -566,9 +561,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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment