diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-06-19 05:28:42 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-06-19 05:28:42 +0000 |
commit | 1ffabca74e6e600f539f81ba3d65dc8d9fa7bbcf (patch) | |
tree | b97824134f012b85f6b5fb94c070c917fad86e0e | |
parent | 466f72b98dd2eeaed0b54219087879a70fd4a452 (diff) | |
download | FreeBSD-src-1ffabca74e6e600f539f81ba3d65dc8d9fa7bbcf.zip FreeBSD-src-1ffabca74e6e600f539f81ba3d65dc8d9fa7bbcf.tar.gz |
Initialize sysctl OID structure by record.
MFC after: 2 weeks
-rw-r--r-- | sys/sys/sysctl.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 6246997..02faa93 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -278,19 +278,16 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a; unsigned long long *b; ); /* This constructs a "raw" MIB oid. */ #define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr)\ static struct sysctl_oid sysctl__##parent##_##name = { \ - &sysctl_##parent##_children, \ - { NULL }, \ - nbr, \ - kind, \ - a1, \ - a2, \ - #name, \ - handler, \ - fmt, \ - 0, \ - 0, \ - __DESCR(descr) \ - }; \ + .oid_parent = &sysctl_##parent##_children, \ + .oid_number = (nbr), \ + .oid_kind = (kind), \ + .oid_arg1 = (a1), \ + .oid_arg2 = (a2), \ + .oid_name = #name, \ + .oid_handler = (handler), \ + .oid_fmt = (fmt), \ + .oid_descr = __DESCR(descr) \ + }; \ DATA_SET(sysctl_set, sysctl__##parent##_##name) #define SYSCTL_ADD_OID(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, descr) \ |