[CRIU] [PATCH 1/5 v5] Add long option for verbosity changes
vkabatov at redhat.com
vkabatov at redhat.com
Tue Jun 20 16:14:08 MSK 2017
From: Veronika Kabatova <vkabatov at redhat.com>
Only long options are supported in configuration files. "-v" is the only
short option which doesn't have a corresponding long option, therefore
users wouldn't be able to setup verbosity in configuration files without
this patch.
Signed-off-by: Veronika Kabatova <vkabatov at redhat.com>
---
Documentation/criu.txt | 7 ++++---
criu/crtools.c | 5 +++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Documentation/criu.txt b/Documentation/criu.txt
index 16284cc..71178d6 100644
--- a/Documentation/criu.txt
+++ b/Documentation/criu.txt
@@ -32,11 +32,12 @@ Common options
~~~~~~~~~~~~~~
Common options are applicable to any 'command'.
-*-v*[*v*...]::
+*-v*[*v*...], *--verbosity*::
Increase verbosity up from the default level. Multiple *v* can be used,
- each increasing verbosity by one level.
+ each increasing verbosity by one level. Using long option without argument
+ increases verbosity by one level.
-*-v*'num'::
+*-v*'num', *--verbosity*='num'::
Set verbosity level to 'num'. The higher the level, the more output
is produced.
+
diff --git a/criu/crtools.c b/criu/crtools.c
index 18ca217..0aeedbe 100644
--- a/criu/crtools.c
+++ b/criu/crtools.c
@@ -313,6 +313,7 @@ int main(int argc, char *argv[], char *envp[])
{ "status-fd", required_argument, 0, 1088 },
{ SK_CLOSE_PARAM, no_argument, 0, 1089 },
BOOL_OPT("remote", &opts.remote),
+ { "verbosity", optional_argument, 0, 'v' },
{ },
};
@@ -966,8 +967,8 @@ usage:
"* Logging:\n"
" -o|--log-file FILE log file name\n"
" --log-pid enable per-process logging to separate FILE.pid files\n"
-" -v[v...] increase verbosity (can use multiple v)\n"
-" -vNUM set verbosity to NUM (higher level means more output):\n"
+" -v[v...]|--verbosity increase verbosity (can use multiple v)\n"
+" -vNUM|--verbosity=NUM set verbosity to NUM (higher level means more output):\n"
" -v1 - only errors and messages\n"
" -v2 - also warnings (default level)\n"
" -v3 - also information messages and timestamps\n"
--
2.7.4
More information about the CRIU
mailing list