Add a 64-bit hex-printed sysctl(9) since there is at least one place in
the code that wanted it. It is named X64 rather than XQUAD since the quad name is a historical abomination that should not be perpetuated.
This commit is contained in:
parent
240577c2a7
commit
376d34d03a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217369
@ -1127,9 +1127,9 @@ dasysctlinit(void *context, int pending)
|
||||
struct ccb_trans_settings_fc *fc = &cts.xport_specific.fc;
|
||||
if (fc->valid & CTS_FC_VALID_WWPN) {
|
||||
softc->wwpn = fc->wwpn;
|
||||
SYSCTL_ADD_XLONG(&softc->sysctl_ctx,
|
||||
SYSCTL_ADD_X64(&softc->sysctl_ctx,
|
||||
SYSCTL_CHILDREN(softc->sysctl_tree),
|
||||
OID_AUTO, "wwpn", CTLTYPE_QUAD | CTLFLAG_RD,
|
||||
OID_AUTO, "wwpn", CTLFLAG_RD,
|
||||
&softc->wwpn, "World Wide Port Name");
|
||||
}
|
||||
}
|
||||
|
@ -245,6 +245,8 @@ SYSCTL_ALLOWED_TYPES(ULONG, unsigned long *a; );
|
||||
SYSCTL_ALLOWED_TYPES(XLONG, unsigned long *a; long *b; );
|
||||
SYSCTL_ALLOWED_TYPES(INT64, int64_t *a; long long *b; );
|
||||
SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a; unsigned long long *b; );
|
||||
SYSCTL_ALLOWED_TYPES(XINT64, uint64_t *a; int64_t *b;
|
||||
unsigned long long *c; long long *d; );
|
||||
|
||||
#ifdef notyet
|
||||
#define SYSCTL_ADD_ASSERT_TYPE(type, ptr) \
|
||||
@ -389,7 +391,6 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a; unsigned long long *b; );
|
||||
SYSCTL_ADD_ASSERT_TYPE(INT64, ptr), 0, \
|
||||
sysctl_handle_quad, "Q", __DESCR(descr))
|
||||
|
||||
/* Oid for a quad. The pointer must be non NULL. */
|
||||
#define SYSCTL_UQUAD(parent, nbr, name, access, ptr, val, descr) \
|
||||
SYSCTL_ASSERT_TYPE(UINT64, ptr, parent, name); \
|
||||
SYSCTL_OID(parent, nbr, name, \
|
||||
@ -402,6 +403,18 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a; unsigned long long *b; );
|
||||
SYSCTL_ADD_ASSERT_TYPE(UINT64, ptr), 0, \
|
||||
sysctl_handle_quad, "QU", __DESCR(descr))
|
||||
|
||||
#define SYSCTL_X64(parent, nbr, name, access, ptr, val, descr) \
|
||||
SYSCTL_ASSERT_TYPE(XINT64, ptr, parent, name); \
|
||||
SYSCTL_OID(parent, nbr, name, \
|
||||
CTLTYPE_QUAD | CTLFLAG_MPSAFE | (access), \
|
||||
ptr, val, sysctl_handle_quad, "QX", descr)
|
||||
|
||||
#define SYSCTL_ADD_X64(ctx, parent, nbr, name, access, ptr, descr) \
|
||||
sysctl_add_oid(ctx, parent, nbr, name, \
|
||||
CTLTYPE_QUAD | CTLFLAG_MPSAFE | (access), \
|
||||
SYSCTL_ADD_ASSERT_TYPE(XINT64, ptr), 0, \
|
||||
sysctl_handle_quad, "QX", __DESCR(descr))
|
||||
|
||||
/* Oid for an opaque object. Specified by a pointer and a length. */
|
||||
#define SYSCTL_OPAQUE(parent, nbr, name, access, ptr, len, fmt, descr) \
|
||||
SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|(access), \
|
||||
|
Loading…
Reference in New Issue
Block a user