From e511a86fc64abdc457ae21415363edd193163b4f Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 22 Mar 2008 12:49:44 +0100 Subject: [PATCH] Move log_disk_space() to df.c. --- df.c | 8 ++++++++ df.h | 1 + dss.c | 7 ------- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/df.c b/df.c index c0c42f8..fe4a7f3 100644 --- a/df.c +++ b/df.c @@ -6,6 +6,7 @@ #include #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 d89531f..156dec1 100644 --- 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 0b6e77e..69e6984 100644 --- 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; -- 2.39.5