Commit 87d0d61e authored by Pavel Emelyanov's avatar Pavel Emelyanov

lock: Show long option in log message about using one

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 25ef4199
...@@ -1087,7 +1087,7 @@ static int collect_file_locks(const struct cr_options *opts) ...@@ -1087,7 +1087,7 @@ static int collect_file_locks(const struct cr_options *opts)
*/ */
if (!list_empty(&file_lock_list)) { if (!list_empty(&file_lock_list)) {
pr_err("Some file locks are hold by dumping tasks!" pr_err("Some file locks are hold by dumping tasks!"
"You can try -l to dump them.\n"); "You can try --" OPT_FILE_LOCKS " to dump them.\n");
return -1; return -1;
} }
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "version.h" #include "version.h"
#include "page-xfer.h" #include "page-xfer.h"
#include "tty.h" #include "tty.h"
#include "file-lock.h"
struct cr_options opts; struct cr_options opts;
...@@ -107,7 +108,7 @@ int main(int argc, char *argv[]) ...@@ -107,7 +108,7 @@ int main(int argc, char *argv[])
{ "action-script", required_argument, 0, 49}, { "action-script", required_argument, 0, 49},
{ LREMAP_PARAM, no_argument, 0, 41}, { LREMAP_PARAM, no_argument, 0, 41},
{ OPT_SHELL_JOB, no_argument, 0, 'j'}, { OPT_SHELL_JOB, no_argument, 0, 'j'},
{ "file-locks", no_argument, 0, 'l'}, { OPT_FILE_LOCKS, no_argument, 0, 'l'},
{ "page-server", no_argument, 0, 50}, { "page-server", no_argument, 0, 50},
{ "address", required_argument, 0, 51}, { "address", required_argument, 0, 51},
{ "port", required_argument, 0, 52}, { "port", required_argument, 0, 52},
...@@ -363,7 +364,7 @@ usage: ...@@ -363,7 +364,7 @@ usage:
pr_msg(" * network-lock - lock network in a target network namespace\n"); pr_msg(" * network-lock - lock network in a target network namespace\n");
pr_msg(" * network-unlock - unlock network in a target network namespace\n"); pr_msg(" * network-unlock - unlock network in a target network namespace\n");
pr_msg(" -j|--%s allow to dump and restore shell jobs\n", OPT_SHELL_JOB); pr_msg(" -j|--%s allow to dump and restore shell jobs\n", OPT_SHELL_JOB);
pr_msg(" -l|--file-locks handle file locks, for safety, only used for container\n"); pr_msg(" -l|--%s handle file locks, for safety, only used for container\n", OPT_FILE_LOCKS);
pr_msg("\n* Logging:\n"); pr_msg("\n* Logging:\n");
pr_msg(" -o|--log-file [NAME] log file name (relative path is relative to --images-dir)\n"); pr_msg(" -o|--log-file [NAME] log file name (relative path is relative to --images-dir)\n");
......
...@@ -53,4 +53,6 @@ extern int dump_task_file_locks(struct parasite_ctl *ctl, ...@@ -53,4 +53,6 @@ extern int dump_task_file_locks(struct parasite_ctl *ctl,
extern int prepare_file_locks(int pid); extern int prepare_file_locks(int pid);
#define OPT_FILE_LOCKS "file-locks"
#endif /* __FILE_LOCK_H__ */ #endif /* __FILE_LOCK_H__ */
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