mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
vgimport/vgexport: return invalid cmd
When option parsing fails, return invalid cmd instead of fail.
This commit is contained in:
parent
5aa2e5ec8c
commit
cf29de5de0
@ -1,5 +1,6 @@
|
||||
Version 2.02.106 -
|
||||
====================================
|
||||
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.
|
||||
Drop unused cmd pointer for internal function for_each_sub_lv().
|
||||
|
@ -56,12 +56,12 @@ int vgexport(struct cmd_context *cmd, int argc, char **argv)
|
||||
{
|
||||
if (!argc && !arg_count(cmd, all_ARG)) {
|
||||
log_error("Please supply volume groups or use -a for all.");
|
||||
return ECMD_FAILED;
|
||||
return EINVALID_CMD_LINE;
|
||||
}
|
||||
|
||||
if (argc && arg_count(cmd, all_ARG)) {
|
||||
log_error("No arguments permitted when using -a for all.");
|
||||
return ECMD_FAILED;
|
||||
return EINVALID_CMD_LINE;
|
||||
}
|
||||
|
||||
return process_each_vg(cmd, argc, argv, READ_FOR_UPDATE, NULL,
|
||||
|
@ -60,12 +60,12 @@ int vgimport(struct cmd_context *cmd, int argc, char **argv)
|
||||
{
|
||||
if (!argc && !arg_count(cmd, all_ARG)) {
|
||||
log_error("Please supply volume groups or use -a for all.");
|
||||
return ECMD_FAILED;
|
||||
return EINVALID_CMD_LINE;
|
||||
}
|
||||
|
||||
if (argc && arg_count(cmd, all_ARG)) {
|
||||
log_error("No arguments permitted when using -a for all.");
|
||||
return ECMD_FAILED;
|
||||
return EINVALID_CMD_LINE;
|
||||
}
|
||||
|
||||
if (arg_count(cmd, force_ARG)) {
|
||||
|
Loading…
Reference in New Issue
Block a user