X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fdpdkstat.c;h=0005d091dd7f465e181c04e3ab125aa61fdb0cfc;hp=c95ba0c6c3d66423c2dad2eba63da239df857272;hb=c4439c9cb3e2348ad7013644731de27a55eca478;hpb=9f77f493ef7cf6077deaa2385d2392d144cf606f diff --git a/src/dpdkstat.c b/src/dpdkstat.c index c95ba0c6..0005d091 100644 --- a/src/dpdkstat.c +++ b/src/dpdkstat.c @@ -32,8 +32,8 @@ #include "collectd.h" -#include "common.h" -#include "utils_dpdk.h" +#include "utils/common/common.h" +#include "utils/dpdk/dpdk.h" #include #include @@ -125,9 +125,8 @@ static int dpdk_stats_preinit(void) { int ret = dpdk_helper_init(g_shm_name, sizeof(dpdk_stats_ctx_t), &g_hc); if (ret != 0) { - char errbuf[ERR_BUF_SIZE]; ERROR("%s: failed to initialize %s helper(error: %s)", DPDK_STATS_PLUGIN, - g_shm_name, sstrerror(errno, errbuf, sizeof(errbuf))); + g_shm_name, STRERRNO); return ret; } @@ -430,7 +429,7 @@ static int dpdk_stats_reinit_helper() { size_t data_size = sizeof(dpdk_stats_ctx_t) + (ctx->stats_count * DPDK_STATS_CTX_GET_XSTAT_SIZE); - DEBUG("%s:%d helper reinit (new_size=%zu)", __FUNCTION__, __LINE__, + DEBUG("%s:%d helper reinit (new_size=%" PRIsz ")", __FUNCTION__, __LINE__, data_size); dpdk_stats_ctx_t tmp_ctx; @@ -446,9 +445,8 @@ static int dpdk_stats_reinit_helper() { int ret; ret = dpdk_helper_init(g_shm_name, data_size, &g_hc); if (ret != 0) { - char errbuf[ERR_BUF_SIZE]; ERROR("%s: failed to initialize %s helper(error: %s)", DPDK_STATS_PLUGIN, - g_shm_name, sstrerror(errno, errbuf, sizeof(errbuf))); + g_shm_name, STRERRNO); return ret; }