mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
report: show empty lock_type for none
Sometimes lock_type would be displayed as "none" (after changing it) and sometimes as empty. Make it consistently empty.
This commit is contained in:
parent
328303d4d4
commit
ccab4a1994
@ -2855,8 +2855,14 @@ static int _vglocktype_disp(struct dm_report *rh, struct dm_pool *mem,
|
|||||||
const void *data, void *private)
|
const void *data, void *private)
|
||||||
{
|
{
|
||||||
const struct volume_group *vg = (const struct volume_group *) data;
|
const struct volume_group *vg = (const struct volume_group *) data;
|
||||||
|
const char *locktype;
|
||||||
|
|
||||||
return _field_string(rh, field, vg->lock_type ? : "");
|
if (!vg->lock_type || !strcmp(vg->lock_type, "none"))
|
||||||
|
locktype = "";
|
||||||
|
else
|
||||||
|
locktype = vg->lock_type;
|
||||||
|
|
||||||
|
return _field_string(rh, field, locktype);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _vglockargs_disp(struct dm_report *rh, struct dm_pool *mem,
|
static int _vglockargs_disp(struct dm_report *rh, struct dm_pool *mem,
|
||||||
|
Loading…
Reference in New Issue
Block a user