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:	b5b7b142a7
This commit is contained in:
Gleb Smirnoff 2022-11-17 08:16:14 -08:00
parent f1ad5e3931
commit bc5708c0e2

View file

@ -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)) && \