From 3147bf2e34f19e06ae21da768cc318bcc185f530 Mon Sep 17 00:00:00 2001 From: Robert Roth Date: Mon, 9 Dec 2013 01:57:01 +0200 Subject: [PATCH] Log error on statvfs failure. When doing stat on a FS and failing, log the error message based on the errno set to help the user find the reason. https://bugzilla.gnome.org/show_bug.cgi?id=685172 --- sysdeps/linux/fsusage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/linux/fsusage.c b/sysdeps/linux/fsusage.c index b1867672..a7fd16c4 100644 --- a/sysdeps/linux/fsusage.c +++ b/sysdeps/linux/fsusage.c @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -197,7 +198,7 @@ glibtop_get_fsusage_s(glibtop *server, glibtop_fsusage *buf, const char *path) memset(buf, 0, sizeof(glibtop_fsusage)); if (statvfs(path, &fsd) < 0) { - glibtop_warn_r(server, "statvfs '%s' failed", path); + glibtop_warn_r(server, "statvfs '%s' failed: %s", path, strerror (errno)); return; }