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
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <mntent.h>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user