From d079b656b4719739b2247dcd9d46e9bec793095a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 Feb 2023 17:11:34 +0100 Subject: Merging upstream version 1.38.0. Signed-off-by: Daniel Baumann --- collectors/proc.plugin/sys_class_infiniband.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'collectors/proc.plugin/sys_class_infiniband.c') diff --git a/collectors/proc.plugin/sys_class_infiniband.c b/collectors/proc.plugin/sys_class_infiniband.c index fca0cb8a2..5f5e53239 100644 --- a/collectors/proc.plugin/sys_class_infiniband.c +++ b/collectors/proc.plugin/sys_class_infiniband.c @@ -200,7 +200,7 @@ static struct ibport { #define GEN_DO_HWCOUNTER_READ(NAME, GRP, DESC, DIR, PORT, HW, ...) \ if (HW->file_##NAME) { \ if (read_single_number_file(HW->file_##NAME, (unsigned long long *)&HW->NAME)) { \ - error("cannot read iface '%s' hwcounter '" #HW "'", PORT->name); \ + collector_error("cannot read iface '%s' hwcounter '" #HW "'", PORT->name); \ HW->file_##NAME = NULL; \ } \ } @@ -469,7 +469,7 @@ int do_sys_class_infiniband(int update_every, usec_t dt) snprintfz(buffer, FILENAME_MAX, "%s/%s/%s", ports_dirname, port_dent->d_name, "rate"); char buffer_rate[65]; if (read_file(buffer, buffer_rate, 64)) { - error("Unable to read '%s'", buffer); + collector_error("Unable to read '%s'", buffer); p->width = 1; } else { char *buffer_width = strstr(buffer_rate, "("); @@ -480,12 +480,11 @@ int do_sys_class_infiniband(int update_every, usec_t dt) } if (!p->discovered) - info( - "Infiniband card %s port %s at speed %" PRIu64 " width %" PRIu64 "", - dev_dent->d_name, - port_dent->d_name, - p->speed, - p->width); + collector_info("Infiniband card %s port %s at speed %" PRIu64 " width %" PRIu64 "", + dev_dent->d_name, + port_dent->d_name, + p->speed, + p->width); p->discovered = 1; } @@ -511,7 +510,7 @@ int do_sys_class_infiniband(int update_every, usec_t dt) #define GEN_DO_COUNTER_READ(NAME, GRP, DESC, DIR, PORT, ...) \ if (PORT->file_##NAME) { \ if (read_single_number_file(PORT->file_##NAME, (unsigned long long *)&PORT->NAME)) { \ - error("cannot read iface '%s' counter '" #NAME "'", PORT->name); \ + collector_error("cannot read iface '%s' counter '" #NAME "'", PORT->name); \ PORT->file_##NAME = NULL; \ } \ } @@ -650,7 +649,7 @@ int do_sys_class_infiniband(int update_every, usec_t dt) // Unknown vendor, should not happen else { - error( + collector_error( "Unmanaged vendor for '%s', do_hwerrors should have been set to no. Please report this bug", port->name); port->do_hwerrors = CONFIG_BOOLEAN_NO; @@ -686,7 +685,7 @@ int do_sys_class_infiniband(int update_every, usec_t dt) // Unknown vendor, should not happen else { - error( + collector_error( "Unmanaged vendor for '%s', do_hwpackets should have been set to no. Please report this bug", port->name); port->do_hwpackets = CONFIG_BOOLEAN_NO; -- cgit v1.2.3