]> git.tue.mpg.de Git - dss.git/commitdiff
Move log_disk_space() to df.c.
authorAndre Noll <maan@systemlinux.org>
Sat, 22 Mar 2008 11:49:44 +0000 (12:49 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 22 Mar 2008 11:49:44 +0000 (12:49 +0100)
df.c
df.h
dss.c

diff --git a/df.c b/df.c
index c0c42f87af6c495db89c61f24c38a7e38d31f268..fe4a7f3b793fadefc0696f8205f9356e279d66e8 100644 (file)
--- a/df.c
+++ b/df.c
@@ -6,6 +6,7 @@
 #include <errno.h>
 
 #include "gcc-compat.h"
+#include "log.h"
 #include "error.h"
 #include "string.h"
 #include "df.h"
@@ -33,3 +34,10 @@ int get_disk_space(const char *path, struct disk_space *result)
        result->percent_free_inodes = 100.0 * available_inodes / total_inodes + 0.5;
        return 1;
 }
+
+void log_disk_space(struct disk_space *ds)
+{
+       DSS_INFO_LOG("free: %uM/%uM (%u%%), %u%% inodes unused\n",
+               ds->free_mb, ds->total_mb, ds->percent_free,
+               ds->percent_free_inodes);
+}
diff --git a/df.h b/df.h
index d89531faff96e3c64341bdac8b5d0fd0aefe92b4..156dec1584022de1b5a514c50ec7a42fdf753a22 100644 (file)
--- a/df.h
+++ b/df.h
@@ -6,4 +6,5 @@ struct disk_space {
 };
 
 int get_disk_space(const char *path, struct disk_space *result);
+void log_disk_space(struct disk_space *ds);
 
diff --git a/dss.c b/dss.c
index 0b6e77e3fd8850dd76f2d87dfb2a74abe67629a8..69e6984890c7ea5e27191900f9904161a5be8d78 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -1062,13 +1062,6 @@ int com_run(void)
        return select_loop();
 }
 
-void log_disk_space(struct disk_space *ds)
-{
-       DSS_INFO_LOG("free: %uM/%uM (%u%%), %u%% inodes unused\n",
-               ds->free_mb, ds->total_mb, ds->percent_free,
-               ds->percent_free_inodes);
-}
-
 int com_prune(void)
 {
        int ret;