summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c517ec5)
raw | patch | inline | side by side (parent: c517ec5)
author | Jan Kundrát <jan.kundrat@cesnet.cz> | |
Thu, 20 Feb 2014 01:13:20 +0000 (02:13 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Mon, 3 Mar 2014 13:59:28 +0000 (14:59 +0100) |
src/lvm.c | patch | blob | history |
diff --git a/src/lvm.c b/src/lvm.c
index 6ef3a7b2ae5be5a424696e764bef179632ed4435..12c621d0569f7b9d05eabdab9c9f043974cd5e28 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);
+ if (!lvs) {
+ /* no VGs are defined, which is not an error per se */
+ return (0);
+ }
+
dm_list_iterate_items(lvl, lvs) {
lvm_submit(vg_name, lvm_lv_get_name(lvl->lv), lvm_lv_get_size(lvl->lv));
}