diff options
author | Bryn M. Reeves <breeves@redhat.com> | 2007-11-02 13:06:42 +0000 |
---|---|---|
committer | Bryn M. Reeves <breeves@redhat.com> | 2007-11-02 13:06:42 +0000 |
commit | 8b98c12815d53ea182cfc8f36b28bb4a111e18f1 (patch) | |
tree | fcb8644f5a44e8869147eb5fd2dede157b20c7bf /tools/vgrename.c | |
parent | e1d586d70e3bad5a791927ebbdfc3112c53a669b (diff) | |
download | lvm2-8b98c12815d53ea182cfc8f36b28bb4a111e18f1.tar.gz lvm2-8b98c12815d53ea182cfc8f36b28bb4a111e18f1.tar.xz lvm2-8b98c12815d53ea182cfc8f36b28bb4a111e18f1.zip |
Add is_orphan_vg() and change all hardcoded checks to use it.
Diffstat (limited to 'tools/vgrename.c')
-rw-r--r-- | tools/vgrename.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/vgrename.c b/tools/vgrename.c index b31d7def..f5de9d78 100644 --- a/tools/vgrename.c +++ b/tools/vgrename.c @@ -65,7 +65,8 @@ static int vg_rename_path(struct cmd_context *cmd, const char *old_vg_path, list_iterate_items(sl, vgids) { vgid = sl->str; - if (!vgid || !(vg_name = vgname_from_vgid(NULL, vgid)) || !*vg_name) + if (!vgid || !(vg_name = vgname_from_vgid(NULL, vgid)) + || is_orphan_vg(vg_name)) continue; if (!strcmp(vg_name, vg_name_old)) { if (match) { |