Commit 6ea0e002 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

criu --help: print extended help in one call

This patch reformats the source to print extended help using just one
pr_msg command. Having it this way is easier to do further edits.

I have checked ./criu --help output before and after to make sure it's
the same.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent abe3c594
...@@ -364,60 +364,62 @@ usage: ...@@ -364,60 +364,62 @@ usage:
return -1; return -1;
} }
pr_msg("\nDump/Restore options:\n"); pr_msg("\n"
"Dump/Restore options:\n"
pr_msg("\n* Generic:\n"); "\n"
pr_msg(" -t|--tree checkpoint/restore the whole process tree identified by pid\n"); "* Generic:\n"
pr_msg(" -d|--restore-detached detach after restore\n"); " -t|--tree checkpoint/restore the whole process tree identified by pid\n"
pr_msg(" -s|--leave-stopped leave tasks in stopped state after checkpoint instead of killing them\n"); " -d|--restore-detached detach after restore\n"
pr_msg(" -R|--leave-running leave tasks in running state after checkpoint\n"); " -s|--leave-stopped leave tasks in stopped state after checkpoint instead of killing them\n"
pr_msg(" -D|--images-dir directory where to put images to\n"); " -R|--leave-running leave tasks in running state after checkpoint\n"
pr_msg(" --pidfile [FILE] write a pid of a root task in this file\n"); " -D|--images-dir directory where to put images to\n"
" --pidfile [FILE] write a pid of a root task in this file\n"
pr_msg("\n* Special resources support:\n"); "\n"
pr_msg(" -x|--%s allow external unix connections\n", USK_EXT_PARAM); "* Special resources support:\n"
pr_msg(" --%s checkpoint/restore established TCP connections\n", SK_EST_PARAM); " -x|--" USK_EXT_PARAM " allow external unix connections\n"
pr_msg(" -r|--root [PATH] change the root filesystem (when run in mount namespace)\n"); " --" SK_EST_PARAM " checkpoint/restore established TCP connections\n"
pr_msg(" --evasive-devices use any path to a device file if the original one is inaccessible\n"); " -r|--root [PATH] change the root filesystem (when run in mount namespace)\n"
pr_msg(" --veth-pair [IN=OUT] correspondence between outside and inside names of veth devices\n"); " --evasive-devices use any path to a device file if the original one is inaccessible\n"
pr_msg(" --link-remap allow to link unlinked files back when possible (modifies FS till restore)\n"); " --veth-pair [IN=OUT] correspondence between outside and inside names of veth devices\n"
pr_msg(" --action-script [SCR] add an external action script\n"); " --link-remap allow to link unlinked files back when possible (modifies FS till restore)\n"
pr_msg(" The environment variable CRTOOLS_SCRIPT_ACTION contains one of the actions:\n"); " --action-script [SCR] add an external action script\n"
pr_msg(" * network-lock - lock network in a target network namespace\n"); " The environment variable CRTOOLS_SCRIPT_ACTION contains one of the actions:\n"
pr_msg(" * network-unlock - unlock network in a target network namespace\n"); " * network-lock - lock network in a target network namespace\n"
pr_msg(" -j|--%s allow to dump and restore shell jobs\n", OPT_SHELL_JOB); " * network-unlock - unlock network in a target network namespace\n"
pr_msg(" -l|--%s handle file locks, for safety, only used for container\n", OPT_FILE_LOCKS); " -j|--" OPT_SHELL_JOB " allow to dump and restore shell jobs\n"
" -l|--" OPT_FILE_LOCKS " handle file locks, for safety, only used for container\n"
pr_msg("\n* Logging:\n"); "\n"
pr_msg(" -o|--log-file [NAME] log file name (relative path is relative to --images-dir)\n"); "* Logging:\n"
pr_msg(" --log-pid if the -o option is in effect, each restored processes is\n"); " -o|--log-file [NAME] log file name (relative path is relative to --images-dir)\n"
pr_msg(" written to the [NAME].pid file\n"); " --log-pid if the -o option is in effect, each restored processes is\n"
pr_msg(" -v [num] set logging level\n"); " written to the [NAME].pid file\n"
pr_msg(" 0 - messages regardless of log level\n"); " -v [num] set logging level\n"
pr_msg(" 1 - errors, when we are in trouble\n"); " 0 - messages regardless of log level\n"
pr_msg(" 2 - warnings (default)\n"); " 1 - errors, when we are in trouble\n"
pr_msg(" 3 - informative, everything is fine\n"); " 2 - warnings (default)\n"
pr_msg(" 4 - debug only\n"); " 3 - informative, everything is fine\n"
pr_msg(" -v same as -v 1\n"); " 4 - debug only\n"
pr_msg(" -vv same as -v 2\n"); " -v same as -v 1\n"
pr_msg(" -vvv same as -v 3\n"); " -vv same as -v 2\n"
pr_msg(" -vvvv same as -v 4\n"); " -vvv same as -v 3\n"
" -vvvv same as -v 4\n"
pr_msg("\nPage server options\n"); "\n"
pr_msg(" --page-server send pages to page server (for 'dump' command)\n"); "Page server options\n"
pr_msg(" --address [ADDR] address of page server\n"); " --page-server send pages to page server (for 'dump' command)\n"
pr_msg(" --port [PORT] port of page server\n"); " --address [ADDR] address of page server\n"
" --port [PORT] port of page server\n"
pr_msg("\nShow options:\n"); "\n"
pr_msg(" -f|--file show contents of a checkpoint file\n"); "Show options:\n"
pr_msg(" -D|--images-dir directory where to get images from\n"); " -f|--file show contents of a checkpoint file\n"
pr_msg(" -c|--contents show contents of pages dumped in hexdump format\n"); " -D|--images-dir directory where to get images from\n"
pr_msg(" -p|--pid <pid> show files relevant to pid (filter -D flood)\n"); " -c|--contents show contents of pages dumped in hexdump format\n"
" -p|--pid <pid> show files relevant to pid (filter -D flood)\n"
pr_msg("\nOther options:\n"); "\n"
pr_msg(" -h|--help show this text\n"); "Other options:\n"
pr_msg(" -V|--version show version\n"); " -h|--help show this text\n"
pr_msg(" --ms don't check not yet merged kernel features\n"); " -V|--version show version\n"
" --ms don't check not yet merged kernel features\n"
);
return -1; return -1;
......
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