From nobody Thu Nov 17 16:16:42 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NClRG5cDwz4hfSb; Thu, 17 Nov 2022 16:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NClRG5445z3nXy; Thu, 17 Nov 2022 16:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668701802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UKlJdc0cm/TsLhMGUQSgiLwVa3Zty2vfuo4uEdnMpDk=; b=S9acacoFLF/bD49y8qUnybDbTtxSC0RrJb1iO6L2+ATTSF8fQSGg7J484namdt2dZiXNXR Jbr7SND9Bi0EyW1gB9wdyY1dtTJDLuaPPNgjlRX9yEQ01yVB0b+WIrVwJSayitXA24/VZi ZspgP5xOB11pFIul3X5+/X9Cnh4i9iwWduhnD1c+We8HnYR0LX33eRZ6brKWcY33xUkiCe HEab2/NhLT5nWqsGxfuJ/m1dV1RVR7LzfE+xdeb270KTGFB9GNTxuEOVIhBvQ1Z6E2pRyM uGD54+fdZ0CwlGK73GXgZcfBW+3Nk3wPqsInEJX+MwjoeIQ49hHmkx3VisxyKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668701802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UKlJdc0cm/TsLhMGUQSgiLwVa3Zty2vfuo4uEdnMpDk=; b=Un5YigCmkwE5U4F2HPXiBy76vb1rb0+Ejkp7OUpL6fkJYDtpieE/ajE4Wg4p5UgVgDOJNf 3/aALg4qly/H7xhOStyqmfwhRZdCi7xRkaGSnp3fcZo4y3c3XKSWt0Y9v/x5qqIYlw8Wpe zRJfMNk6iVgq+ObNAGoNh1Fd6eCI6DPU3GUSfL6bzRFm7Jno3ha465VeF+KdLf3yae/Hp7 PoS8v7XpZ/goaJMJoX1Shf1alzKOzigk9u5LEqbBj/Vf9n0vq1gA5lbymQyl3sGcl+wqa1 AKpbzS8y6rO0PelLEZ8dsJLAGiOYenawJ8sfxsmd1DIYm6O8fUfj8o4UerKDdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668701802; a=rsa-sha256; cv=none; b=LYoCo0IaAOgYgg8VwQlq0fTHH1Yw+ja73jmsen8n7I0u+RuEtqNVnd4PKYJ3bvQ2eBuLGi oAYv6el9neAUfX3JMQpOZLUc2+5tJhmfvtzQkhhJnkR+gHnjeMTpzEWZP78Or5KY6h/GDd YtZM4fTNj1hQMdI5iQE8W5s+Fdgafq+2Z+eopgKj8pZ90vVZh5hcjlBwNjsMJl9o8pdVNV 8iBGsgzoZSehqXdRM3o2CLPTxtmQ1wBFkweyVffks9Ob7LswnYVrkDS7+yNvBqY/1EbXbG maS0D5q3Mm/nCvc/Do3vbGH+FWPldRPcWocmLcY8HQtsNpTUYWPT8MoysTgt2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NClRG45mfzn6Q; Thu, 17 Nov 2022 16:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2AHGGg5u097170; Thu, 17 Nov 2022 16:16:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AHGGgpm097169; Thu, 17 Nov 2022 16:16:42 GMT (envelope-from git) Date: Thu, 17 Nov 2022 16:16:42 GMT Message-Id: <202211171616.2AHGGgpm097169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: bc5708c0e2fc - main - counter: fix SYSCTL_COUNTER_U64_ARRAY type List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc5708c0e2fc7a936e06a7916c292023ebd53e2a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=bc5708c0e2fc7a936e06a7916c292023ebd53e2a commit bc5708c0e2fc7a936e06a7916c292023ebd53e2a Author: Gleb Smirnoff AuthorDate: 2022-11-17 16:16:14 +0000 Commit: Gleb Smirnoff CommitDate: 2022-11-17 16:16:14 +0000 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 040012581087..207ffe4a62e7 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)) && \