X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fvserver.c;h=a730593654bb79c3c0d6b58d69aef812ef2cb838;hb=d061c270fabc5dba961cf2b94ebe968e9a89b899;hp=6c09f439b1a157e1c8b29d41796fa0f4b0ef3b22;hpb=b66d5b90a0e59e943a61acb4b68ce55e88f08ade;p=collectd.git diff --git a/src/vserver.c b/src/vserver.c index 6c09f439..a7305936 100644 --- a/src/vserver.c +++ b/src/vserver.c @@ -27,6 +27,7 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" @@ -146,7 +147,7 @@ static int vserver_read (void) if (proc == NULL) { char errbuf[1024]; - ERROR ("vserver plugin: fopen (%s): %s", PROCDIR, + ERROR ("vserver plugin: fopen (%s): %s", PROCDIR, sstrerror (errno, errbuf, sizeof (errbuf))); return (-1); } @@ -185,7 +186,7 @@ static int vserver_read (void) len = ssnprintf (file, sizeof (file), PROCDIR "/%s", dent->d_name); if ((len < 0) || (len >= BUFSIZE)) continue; - + status = stat (file, &statbuf); if (status != 0) { @@ -194,7 +195,7 @@ static int vserver_read (void) file, sstrerror (errno, errbuf, sizeof (errbuf))); continue; } - + if (!S_ISDIR (statbuf.st_mode)) continue;