diff options
| author | Colin Percival <cperciva@FreeBSD.org> | 2025-03-31 04:05:33 +0000 |
|---|---|---|
| committer | Colin Percival <cperciva@FreeBSD.org> | 2025-04-02 15:51:04 +0000 |
| commit | e85aaed60eb061f31b2f1e5dc92b0ff0419b5fbf (patch) | |
| tree | 46ab83857110787bdd2b82ffca690a1c70169aa8 | |
| parent | c10fd9ac00b1097ab622d055dcc3d1484012bccc (diff) | |
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
| -rw-r--r-- | sys/sys/sysctl.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 916c91da3d53..0eb9ff274c1b 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -864,7 +864,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) @@ -874,7 +874,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); \ }) @@ -882,7 +882,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) @@ -892,7 +892,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); \ }) |
