diff options
author | Alasdair Kergon <agk@redhat.com> | 2002-01-29 19:19:37 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2002-01-29 19:19:37 +0000 |
commit | df91af91413f262e6ffdda04ef7b0a616b4023e2 (patch) | |
tree | 12b5ef526bf264381091b1abb5e8c656299b5eb3 /tools/vgexport.c | |
parent | f53c6aa66ef8b5c75a4e43e6cf518f0ec9cd5cfe (diff) | |
download | lvm2-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.c | 10 |
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); } |