summaryrefslogtreecommitdiff
path: root/tools/vgexport.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2002-01-29 19:19:37 +0000
committerAlasdair Kergon <agk@redhat.com>2002-01-29 19:19:37 +0000
commitdf91af91413f262e6ffdda04ef7b0a616b4023e2 (patch)
tree12b5ef526bf264381091b1abb5e8c656299b5eb3 /tools/vgexport.c
parentf53c6aa66ef8b5c75a4e43e6cf518f0ec9cd5cfe (diff)
downloadlvm2-df91af91413f262e6ffdda04ef7b0a616b4023e2.tar.gz
o A vgimport implementation
o Require -a or <list of vgs> parameters with vgexport/vgimport o Allow pvcreate -ff to destroy exported/partial VGs
Diffstat (limited to 'tools/vgexport.c')
-rw-r--r--tools/vgexport.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/vgexport.c b/tools/vgexport.c
index 9ece85a13..2c55af95d 100644
--- a/tools/vgexport.c
+++ b/tools/vgexport.c
@@ -24,6 +24,16 @@ static int vgexport_single(const char *vg_name);
int vgexport(int argc, char **argv)
{
+ if (!argc && !arg_count(all_ARG)) {
+ log_error("Please supply volume groups or use -a for all.");
+ return ECMD_FAILED;
+ }
+
+ if (argc && arg_count(all_ARG)) {
+ log_error("No arguments permitted when using -a for all.");
+ return ECMD_FAILED;
+ }
+
return process_each_vg(argc, argv, &vgexport_single);
}