Xinqi Bao's Git

Clean up header includes
[slstatus.git] / components / disk.c
index cf3c099..9d2284e 100644 (file)
@@ -1,7 +1,5 @@
 /* See LICENSE file for copyright and license details. */
 /* See LICENSE file for copyright and license details. */
-#include <errno.h>
 #include <stdio.h>
 #include <stdio.h>
-#include <string.h>
 #include <sys/statvfs.h>
 
 #include "../util.h"
 #include <sys/statvfs.h>
 
 #include "../util.h"
@@ -16,7 +14,7 @@ disk_free(const char *mnt)
                return NULL;
        }
 
                return NULL;
        }
 
-       return fmt_human_2(fs.f_frsize * fs.f_bavail);
+       return fmt_human(fs.f_frsize * fs.f_bavail, 1024);
 }
 
 const char *
 }
 
 const char *
@@ -43,7 +41,7 @@ disk_total(const char *mnt)
                return NULL;
        }
 
                return NULL;
        }
 
-       return fmt_human_2(fs.f_frsize * fs.f_blocks);
+       return fmt_human(fs.f_frsize * fs.f_blocks, 1024);
 }
 
 const char *
 }
 
 const char *
@@ -56,5 +54,5 @@ disk_used(const char *mnt)
                return NULL;
        }
 
                return NULL;
        }
 
-       return fmt_human_2(fs.f_frsize * (fs.f_blocks - fs.f_bfree));
+       return fmt_human(fs.f_frsize * (fs.f_blocks - fs.f_bfree), 1024);
 }
 }