From 207aa8a1317567f4fd6ddca3d09c7205c18c08c1 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Tue, 21 Oct 2003 22:21:41 +0000 Subject: [PATCH] Fix exported format1 VG recognition. --- lib/format1/disk-rep.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/format1/disk-rep.c b/lib/format1/disk-rep.c index 4da91dd55..2c15aadba 100644 --- a/lib/format1/disk-rep.c +++ b/lib/format1/disk-rep.c @@ -263,14 +263,13 @@ void munge_exported_vg(struct pv_disk *pvd) /* Return if PV not in a VG */ if ((!*pvd->vg_name)) return; - /* FIXME also check vgd->status & VG_EXPORTED? */ l = strlen(pvd->vg_name); s = sizeof(EXPORTED_TAG); - if (!strncmp(pvd->vg_name + l - s + 1, EXPORTED_TAG, s)) - pvd->vg_name[l - s + 1] = '\0'; - - pvd->pv_status |= VG_EXPORTED; + if (!strncmp(pvd->vg_name + l - s + 1, EXPORTED_TAG, s)) { + pvd->vg_name[l - s + 1] = '\0'; + pvd->pv_status |= VG_EXPORTED; + } } static struct disk_list *__read_disk(const struct format_type *fmt,