master - pvdisplay: fix option error
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=844afa32a0d980d0bf09ae1663f010d9e1a12839 Commit: 844afa32a0d980d0bf09ae1663f010d9e1a12839 Parent: cf29de5de0a39ade491e18c1fe0e8bd3c2937b08 Author: Zdenek Kabelac <[email protected]> AuthorDate: Sun Mar 30 23:12:09 2014 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Sun Mar 30 23:41:52 2014 +0200
pvdisplay: fix option error
Properly show error for '-m'.
Also report unsupported '-c & -s' (just like with vg/lvdisplay)
--- WHATS_NEW | 1 + tools/pvdisplay.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.106 - ==================================== + Fix error message for pvdisplay -c -m and add new for pvdisplay -c -s. Return proper invalid cmd when vgimport/exports find error in parameters. Obtain list of known VGs for pvchange --all when using lvmetad. Add man page for lvm dumpconfig.
tools/pvdisplay.c +6 -1
@@ -109,7 +109,12 @@ int pvdisplay(struct cmd_context *cmd, int argc, char **argv) }if (arg_count (cmd, colon_ARG) &&arg_count (cmd, maps_ARG)) { -log_error ("Option -v not allowed with option -c" ); +log_error ("Option -c not allowed with option -m" ); +return EINVALID_CMD_LINE ; + } + +if (arg_count (cmd, colon_ARG) &&arg_count (cmd, short_ARG)) { +log_error ("Option -c is not allowed with option -s" );return EINVALID_CMD_LINE ; }