X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fnuma.c;h=dfe7a6dc605bf41fda65f56f5f61bb0296a79823;hp=56ea707ccf648cc5b433add6af85a3d5344945fd;hb=0e73c26f5670b2f11eecfdadaf545bcc7f260658;hpb=6d79874b8afa65cbb4a8e348caf37b8e60fbeded diff --git a/src/numa.c b/src/numa.c index 56ea707c..dfe7a6dc 100644 --- a/src/numa.c +++ b/src/numa.c @@ -26,8 +26,8 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" #if !KERNEL_LINUX #error "No applicable input method." @@ -66,9 +66,8 @@ static int numa_read_node(int node) /* {{{ */ fh = fopen(path, "r"); if (fh == NULL) { - char errbuf[1024]; ERROR("numa plugin: Reading node %i failed: open(%s): %s", node, path, - sstrerror(errno, errbuf, sizeof(errbuf))); + STRERRNO); return -1; } @@ -137,9 +136,7 @@ static int numa_init(void) /* {{{ */ break; } else /* ((status != 0) && (errno != ENOENT)) */ { - char errbuf[1024]; - ERROR("numa plugin: stat(%s) failed: %s", path, - sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR("numa plugin: stat(%s) failed: %s", path, STRERRNO); return -1; } }