diff options
author | Alasdair Kergon <agk@redhat.com> | 2006-04-11 17:42:15 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2006-04-11 17:42:15 +0000 |
commit | f084e627cc5847aa1f08e25b654b6f9512a5b39d (patch) | |
tree | f838990c8854b704c4d72dcfe97c4e8bd6e151db /lib/format1/lvm1-label.c | |
parent | f9c232c2eebf02608b50cbde07c1674c211e9313 (diff) | |
download | lvm2-f084e627cc5847aa1f08e25b654b6f9512a5b39d.tar.gz lvm2-f084e627cc5847aa1f08e25b654b6f9512a5b39d.tar.xz lvm2-f084e627cc5847aa1f08e25b654b6f9512a5b39d.zip |
When scanning, also record whether or not VG is exported.
Diffstat (limited to 'lib/format1/lvm1-label.c')
-rw-r--r-- | lib/format1/lvm1-label.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/format1/lvm1-label.c b/lib/format1/lvm1-label.c index dfd81401..9b30c916 100644 --- a/lib/format1/lvm1-label.c +++ b/lib/format1/lvm1-label.c @@ -61,13 +61,17 @@ static int _read(struct labeller *l, struct device *dev, char *buf, struct vg_disk vgd; struct lvmcache_info *info; const char *vgid = NULL; + int exported = 0; munge_pvd(dev, pvd); - if (*pvd->vg_name && read_vgd(dev, &vgd, pvd)) + if (*pvd->vg_name && read_vgd(dev, &vgd, pvd)) { vgid = vgd.vg_uuid; + exported = pvd->pv_status & VG_EXPORTED; + } - if (!(info = lvmcache_add(l, pvd->pv_uuid, dev, pvd->vg_name, vgid))) { + if (!(info = lvmcache_add(l, pvd->pv_uuid, dev, pvd->vg_name, vgid, + exported))) { stack; return 0; } |