summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 41294b0)
raw | patch | inline | side by side (parent: 41294b0)
author | Chad Malfait <cmalfait@yahoo.com> | |
Sat, 6 Apr 2013 20:44:51 +0000 (14:44 -0600) | ||
committer | Chad Malfait <cmalfait@yahoo.com> | |
Sat, 6 Apr 2013 20:44:51 +0000 (14:44 -0600) |
src/volume.c | patch | blob | history |
diff --git a/src/volume.c b/src/volume.c
index 99a1434f3906e950a3e39130c045f36db5ce3571..ab39dc907549cd97d77ef223cef992a3f809af86 100644 (file)
--- a/src/volume.c
+++ b/src/volume.c
#include "plugin.h"
#include <lvm2app.h>
-#define GB (1024*1024*1024)
-#define MB (1024*1024)
-
static void volume_submit(const char *vol_name, gauge_t size, gauge_t free)
{
value_t values[2];
dm_list_iterate_items(strl, vgnames) {
vg = lvm_vg_open(lvm, strl->str, "r", 0);
- volume_submit(strl->str, (float)lvm_vg_get_size(vg)/GB, (float)lvm_vg_get_free_size(vg)/GB);
+ volume_submit(strl->str, lvm_vg_get_size(vg), lvm_vg_get_free_size(vg));
lvm_vg_close(vg);
}