mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2004-12-02 Ralf Corsepius <ralf.corsepius@rtems.org>
* libnetworking/kern/kern_sysctl.c, libnetworking/sys/sysctl.h: Add SYSCTL_CHILDREN_SET (Update from FreeBSD for GCC-4.0.0).
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2004-12-02 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* libnetworking/kern/kern_sysctl.c,
|
||||
libnetworking/sys/sysctl.h: Add SYSCTL_CHILDREN_SET
|
||||
(Update from FreeBSD for GCC-4.0.0).
|
||||
|
||||
2004-12-02 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* libnetworking/kern/kern_sysctl.c, libnetworking/netinet/ip_mroute.c,
|
||||
|
||||
@@ -392,9 +392,8 @@ sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent,
|
||||
oidp->oid_kind = CTLFLAG_DYN | kind;
|
||||
if ((kind & CTLTYPE) == CTLTYPE_NODE) {
|
||||
/* Allocate space for children */
|
||||
/* Later accessed by macro SYSCTL_CHILDREN(oidp) */
|
||||
oidp->oid_arg1 = malloc(sizeof(struct sysctl_oid_list),
|
||||
M_SYSCTLOID, M_WAITOK);
|
||||
SYSCTL_CHILDREN_SET(oidp, malloc(sizeof(struct sysctl_oid_list),
|
||||
M_SYSCTLOID, M_WAITOK));
|
||||
SLIST_INIT(SYSCTL_CHILDREN(oidp));
|
||||
} else {
|
||||
oidp->oid_arg1 = arg1;
|
||||
|
||||
@@ -180,6 +180,8 @@ void sysctl_unregister_oid(struct sysctl_oid *oidp);
|
||||
/* Hide these in macros */
|
||||
#define SYSCTL_CHILDREN(oid_ptr) (struct sysctl_oid_list *) \
|
||||
(oid_ptr)->oid_arg1
|
||||
#define SYSCTL_CHILDREN_SET(oid_ptr, val) \
|
||||
(oid_ptr)->oid_arg1 = (val);
|
||||
#define SYSCTL_STATIC_CHILDREN(oid_name) \
|
||||
(&sysctl_##oid_name##_children)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user