1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

pvscan: return error when free parameter is given

Just like vgscan, pvscan (without --cache option) is not
accepting and 'free' args  (i.e.  pvscan /dev/sdx)
This commit is contained in:
Zdenek Kabelac 2014-03-30 23:32:53 +02:00
parent 844afa32a0
commit 7a9c569eb4
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.106 -
====================================
Report error when running pvscan with free argument (i.e. PV name).
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.

View File

@ -334,6 +334,11 @@ int pvscan(struct cmd_context *cmd, int argc, char **argv)
if (arg_count(cmd, cache_ARG))
return _pvscan_lvmetad(cmd, argc, argv);
if (argc) {
log_error("Too many parameters on command line.");
return EINVALID_CMD_LINE;
}
if (arg_count(cmd, activate_ARG)) {
log_error("--activate is only valid with --cache.");
return EINVALID_CMD_LINE;