projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1454 from rubenk/libi2c-dev-mark-as-linux-only
[collectd.git]
/
src
/
lvm.c
diff --git
a/src/lvm.c
b/src/lvm.c
index
cb07332
..
9e24542
100644
(file)
--- a/
src/lvm.c
+++ b/
src/lvm.c
@@
-119,6
+119,11
@@
static void vg_read(vg_t vg, char const *vg_name)
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) {
+ /* no VGs are defined, which is not an error per se */
+ 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");