summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 23cbc33)
raw | patch | inline | side by side (parent: 23cbc33)
author | Florian Forster <octo@huhu.verplant.org> | |
Thu, 20 Aug 2009 12:10:37 +0000 (14:10 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Sat, 22 Aug 2009 00:21:06 +0000 (02:21 +0200) |
→ See also: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542859
src/df.c | patch | blob | history |
diff --git a/src/df.c b/src/df.c
index 38079d8772e232f44ac690cc636222a67e45195e..2c59b01c63e7f5a5e65163f4e1278609fbec8a17 100644 (file)
--- a/src/df.c
+++ b/src/df.c
for (mnt_ptr = mnt_list; mnt_ptr != NULL; mnt_ptr = mnt_ptr->next)
{
- if (STATANYFS (mnt_ptr->dir, &statbuf) < 0)
- {
- char errbuf[1024];
- ERROR ("statv?fs failed: %s",
- sstrerror (errno, errbuf,
- sizeof (errbuf)));
- continue;
- }
-
- if (!statbuf.f_blocks)
- continue;
-
- blocksize = BLOCKSIZE(statbuf);
- df_free = statbuf.f_bfree * blocksize;
- df_used = (statbuf.f_blocks - statbuf.f_bfree) * blocksize;
-
if (strcmp (mnt_ptr->dir, "/") == 0)
{
sstrncpy (mnt_name, "root", sizeof (mnt_name));
if (ignorelist_match (il_fstype, mnt_ptr->type))
continue;
+ if (STATANYFS (mnt_ptr->dir, &statbuf) < 0)
+ {
+ char errbuf[1024];
+ ERROR ("statv?fs failed: %s",
+ sstrerror (errno, errbuf,
+ sizeof (errbuf)));
+ continue;
+ }
+
+ if (!statbuf.f_blocks)
+ continue;
+
+ blocksize = BLOCKSIZE(statbuf);
+ df_free = statbuf.f_bfree * blocksize;
+ df_used = (statbuf.f_blocks - statbuf.f_bfree) * blocksize;
+
df_submit (mnt_name, df_used, df_free);
}