Version 2.02.66 -
===============================
+ Use is_orphan_vg in place of hard-coded prefix tests.
Version 2.02.65 - 17th May 2010
===============================
/*
* Ensure vgname2 comes after vgname1 alphabetically.
- * Special VG names beginning with '#' don't count.
+ * Orphans don't count.
*/
static int _vgname_order_correct(const char *vgname1, const char *vgname2)
{
- if ((*vgname1 == '#') || (*vgname2 == '#'))
+ if (is_orphan_vg(vgname1) || is_orphan_vg(vgname2))
return 1;
if (strcmp(vgname1, vgname2) < 0)
}
/* If the VG name is empty then lock the unused PVs */
- if (*resource == '#' || (flags & LCK_CACHE))
+ if (is_orphan_vg(resource) || (flags & LCK_CACHE))
dm_snprintf(lockname, sizeof(lockname), "P_%s",
resource);
else
if (flags & LCK_CACHE)
break;
- if (*resource == '#')
+ if (is_orphan_vg(resource))
dm_snprintf(lockfile, sizeof(lockfile),
"%s/P_%s", _lock_dir, resource + 1);
else
return 0;
}
- if (*resource == '#' && (flags & LCK_CACHE)) {
+ if (is_orphan_vg(resource) && (flags & LCK_CACHE)) {
log_error(INTERNAL_ERROR "P_%s referenced", resource);
return 0;
}
if (!_blocking_supported)
flags |= LCK_NONBLOCK;
- if (vol[0] != '#' &&
+ if (!is_orphan_vg(vol) &&
((flags & LCK_TYPE_MASK) != LCK_UNLOCK) &&
(!(flags & LCK_CACHE)) &&
!lvmcache_verify_lock_order(vol))