diff --git a/src/lvm.c b/src/lvm.c
index 107766c33ecf3f0395d9c4fb12b24a8bcdf807fd..9e245423fef2c829d842619a3a77ee8213864ae4 100644 (file)
--- a/src/lvm.c
+++ b/src/lvm.c
lvm_submit (vg_name, "free", lvm_vg_get_free_size(vg));
lvs = lvm_vg_list_lvs(vg);
lvm_submit (vg_name, "free", lvm_vg_get_free_size(vg));
lvs = lvm_vg_list_lvs(vg);
- if (lvs == NULL)
+ if (!lvs) {
+ /* no VGs are defined, which is not an error per se */
return;
return;
+ }
+
dm_list_iterate_items(lvl, lvs) {
name = lvm_lv_get_name(lvl->lv);
attrs = get_lv_property_string(lvl->lv, "lv_attr");
dm_list_iterate_items(lvl, lvs) {
name = lvm_lv_get_name(lvl->lv);
attrs = get_lv_property_string(lvl->lv, "lv_attr");