Version 2.02.117 -
====================================
+ Add support for -S/--select to vgexport and vgimport.
Add support for -S/--select to vgdisplay, lvdisplay and pvdisplay without -C.
Add support for -S/--select to vgremove and lvremove.
Add support for -S/--select to vgchange,lvchange and pvchange.
"\t[--commandprofile ProfileName]\n"
"\t[-d|--debug]\n"
"\t[-h|--help]\n"
+ "\t[-S|--select Selection]\n"
"\t[-v|--verbose]\n"
"\t[--version]\n"
"\tVolumeGroupName [VolumeGroupName...]\n",
- all_ARG, test_ARG)
+ all_ARG, select_ARG, test_ARG)
xx(vgextend,
"Add physical volumes to a volume group",
"\t[-d|--debug]\n"
"\t[-f|--force]\n"
"\t[-h|--help]\n"
+ "\t[-S|--select Selection]\n"
"\t[-t|--test]\n"
"\t[-v|--verbose]\n"
"\t[--version]\n"
"\tVolumeGroupName...\n",
- all_ARG, force_ARG, test_ARG)
+ all_ARG, force_ARG, select_ARG, test_ARG)
xx(vgmerge,
"Merge volume groups",
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.");
+ if (!argc && !arg_count(cmd, all_ARG) && !arg_is_set(cmd, select_ARG)) {
+ log_error("Please supply volume groups or use -S for selection or use -a for all.");
return EINVALID_CMD_LINE;
}
- if (argc && arg_count(cmd, all_ARG)) {
+ if (arg_count(cmd, all_ARG) && (argc || arg_is_set(cmd, select_ARG))) {
log_error("No arguments permitted when using -a for all.");
return EINVALID_CMD_LINE;
}
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.");
+ if (!argc && !arg_count(cmd, all_ARG) && !arg_is_set(cmd, select_ARG)) {
+ log_error("Please supply volume groups or -S for selection or use -a for all.");
return EINVALID_CMD_LINE;
}
- if (argc && arg_count(cmd, all_ARG)) {
+ if (arg_count(cmd, all_ARG) && (argc || arg_is_set(cmd, select_ARG))) {
log_error("No arguments permitted when using -a for all.");
return EINVALID_CMD_LINE;
}