git: 1bd29261b9d0 - stable/14 - Correct CTLTYPE of SYSCTL_SBINTIME_MSEC etc
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 16 Apr 2025 03:18:57 UTC
The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=1bd29261b9d0a1f64faa45bac531c62a4709dda9 commit 1bd29261b9d0a1f64faa45bac531c62a4709dda9 Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2025-03-31 04:05:33 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2025-04-16 03:13:13 +0000 Correct CTLTYPE of SYSCTL_SBINTIME_MSEC etc These should be CTLTYPE_S64, not CTLTYPE_INT, since they handle 64-bit values. Reviewed by: imp Fixes: 003ffd57fee1 ("Add sysctl_usec_to_sbintime [...]") MFC after: 2 weeks Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D49584 (cherry picked from commit e85aaed60eb061f31b2f1e5dc92b0ff0419b5fbf) --- sys/sys/sysctl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 5955b704b7f9..5fce4b8e1713 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -866,7 +866,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); /* OID expressing a sbintime_t as microseconds */ #define SYSCTL_SBINTIME_USEC(parent, nbr, name, access, ptr, descr) \ SYSCTL_OID(parent, nbr, name, \ - CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ + CTLTYPE_S64 | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ (ptr), 0, sysctl_usec_to_sbintime, "Q", descr); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S64) @@ -876,7 +876,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S64); \ sysctl_add_oid(ctx, parent, nbr, name, \ - CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ + CTLTYPE_S64 | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ __ptr, 0, sysctl_usec_to_sbintime, "Q", __DESCR(descr), \ NULL); \ }) @@ -884,7 +884,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); /* OID expressing a sbintime_t as milliseconds */ #define SYSCTL_SBINTIME_MSEC(parent, nbr, name, access, ptr, descr) \ SYSCTL_OID(parent, nbr, name, \ - CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ + CTLTYPE_S64 | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ (ptr), 0, sysctl_msec_to_sbintime, "Q", descr); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S64) @@ -894,7 +894,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S64); \ sysctl_add_oid(ctx, parent, nbr, name, \ - CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ + CTLTYPE_S64 | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ __ptr, 0, sysctl_msec_to_sbintime, "Q", __DESCR(descr), \ NULL); \ })