diff --git a/WHATS_NEW b/WHATS_NEW index 1944eeaa8..b409a0801 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,7 @@ Version 2.02.07 - ================================= + Fix PV tools to include orphaned PVs in default output again. + Fixed unaligned access when using clvm. Fix an extra dev_close in a label_read error path. Append patches to commit emails. Fix target_register_events args. @@ -13,7 +15,6 @@ Version 2.02.07 - Add 'Completed' debug message. Don't attempt library exit after reloading config files. Always compile with libdevmapper, even if device-mapper is disabled. - Fixed unaligned access when using clvm. Version 2.02.06 - 12th May 2006 =============================== diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index 9df6fd5b7..3361a93ba 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -169,14 +169,18 @@ struct lvmcache_vginfo *vginfo_from_vgid(const char *vgid) const char *vgname_from_vgid(struct dm_pool *mem, const char *vgid) { struct lvmcache_vginfo *vginfo; + const char *vgname = NULL; - if ((vginfo = vginfo_from_vgid(vgid))) { - if (mem) - return dm_pool_strdup(mem, vginfo->vgname); - return vginfo->vgname; - } + if (!*vgid) + vgname = ORPHAN; - return NULL; + if ((vginfo = vginfo_from_vgid(vgid))) + vgname = vginfo->vgname; + + if (mem && vgname) + return dm_pool_strdup(mem, vgname); + + return vgname; } struct lvmcache_info *info_from_pvid(const char *pvid)