Explicit CTLFLAG_DYN not needed
Dynamically created OIDs automatically get this flag set. Reviewed by: jhb MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D26561
This commit is contained in:
parent
4c2dddd8a7
commit
3331a1d173
@ -88,19 +88,19 @@ SYSCTL_DECL(_net_inet);
|
||||
ptr, val, sysctl_ipf_int, "I", descr)
|
||||
#define SYSCTL_DYN_IPF_NAT(parent, nbr, name, access,ptr, val, descr) \
|
||||
SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
|
||||
CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE |access, \
|
||||
CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE |access, \
|
||||
ptr, val, sysctl_ipf_int_nat, "I", descr)
|
||||
#define SYSCTL_DYN_IPF_STATE(parent, nbr, name, access,ptr, val, descr) \
|
||||
SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
|
||||
CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \
|
||||
CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \
|
||||
ptr, val, sysctl_ipf_int_state, "I", descr)
|
||||
#define SYSCTL_DYN_IPF_FRAG(parent, nbr, name, access,ptr, val, descr) \
|
||||
SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
|
||||
CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \
|
||||
CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \
|
||||
ptr, val, sysctl_ipf_int_frag, "I", descr)
|
||||
#define SYSCTL_DYN_IPF_AUTH(parent, nbr, name, access,ptr, val, descr) \
|
||||
SYSCTL_ADD_OID(&ipf_clist, SYSCTL_STATIC_CHILDREN(parent), nbr, name, \
|
||||
CTLFLAG_DYN | CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \
|
||||
CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_MPSAFE | access, \
|
||||
ptr, val, sysctl_ipf_int_auth, "I", descr)
|
||||
static struct sysctl_ctx_list ipf_clist;
|
||||
#define CTLFLAG_OFF 0x00800000 /* IPFilter must be disabled */
|
||||
|
@ -210,19 +210,19 @@ vpd_attach (device_t dev)
|
||||
sysctl_ctx_init(&sc->ctx);
|
||||
SYSCTL_ADD_STRING(&sc->ctx,
|
||||
SYSCTL_STATIC_CHILDREN(_hw_vpd_machine_type), OID_AUTO,
|
||||
unit, CTLFLAG_RD|CTLFLAG_DYN, sc->MachineType, 0, NULL);
|
||||
unit, CTLFLAG_RD, sc->MachineType, 0, NULL);
|
||||
SYSCTL_ADD_STRING(&sc->ctx,
|
||||
SYSCTL_STATIC_CHILDREN(_hw_vpd_machine_model), OID_AUTO,
|
||||
unit, CTLFLAG_RD|CTLFLAG_DYN, sc->MachineModel, 0, NULL);
|
||||
unit, CTLFLAG_RD, sc->MachineModel, 0, NULL);
|
||||
SYSCTL_ADD_STRING(&sc->ctx,
|
||||
SYSCTL_STATIC_CHILDREN(_hw_vpd_build_id), OID_AUTO,
|
||||
unit, CTLFLAG_RD|CTLFLAG_DYN, sc->BuildID, 0, NULL);
|
||||
unit, CTLFLAG_RD, sc->BuildID, 0, NULL);
|
||||
SYSCTL_ADD_STRING(&sc->ctx,
|
||||
SYSCTL_STATIC_CHILDREN(_hw_vpd_serial_box), OID_AUTO,
|
||||
unit, CTLFLAG_RD|CTLFLAG_DYN, sc->BoxSerial, 0, NULL);
|
||||
unit, CTLFLAG_RD, sc->BoxSerial, 0, NULL);
|
||||
SYSCTL_ADD_STRING(&sc->ctx,
|
||||
SYSCTL_STATIC_CHILDREN(_hw_vpd_serial_planar), OID_AUTO,
|
||||
unit, CTLFLAG_RD|CTLFLAG_DYN, sc->PlanarSerial, 0, NULL);
|
||||
unit, CTLFLAG_RD, sc->PlanarSerial, 0, NULL);
|
||||
|
||||
device_printf(dev, "Machine Type: %.4s, Model: %.3s, Build ID: %.9s\n",
|
||||
sc->MachineType, sc->MachineModel, sc->BuildID);
|
||||
|
Loading…
Reference in New Issue
Block a user