From bc5708c0e2fc7a936e06a7916c292023ebd53e2a Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Thu, 17 Nov 2022 08:16:14 -0800 Subject: [PATCH] counter: fix SYSCTL_COUNTER_U64_ARRAY type There is nothing wrong with declaring an array as CTLTYPE_U64. Note that sysctl(8) is able to print such arrays and doesn't need any change. Fixes: b5b7b142a7e0e74bdd8c497f6a14804e71654dfd --- sys/sys/sysctl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 04001258108..207ffe4a62e 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -757,8 +757,8 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); /* Oid for an array of counter(9)s. The pointer and length must be non zero. */ #define SYSCTL_COUNTER_U64_ARRAY(parent, nbr, name, access, ptr, len, descr) \ SYSCTL_OID(parent, nbr, name, \ - CTLTYPE_OPAQUE | CTLFLAG_MPSAFE | CTLFLAG_STATS | (access), \ - (ptr), (len), sysctl_handle_counter_u64_array, "S", descr); \ + CTLTYPE_U64 | CTLFLAG_MPSAFE | CTLFLAG_STATS | (access), \ + (ptr), (len), sysctl_handle_counter_u64_array, "QU", descr);\ CTASSERT((((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE) && \ sizeof(counter_u64_t) == sizeof(*(ptr)) && \