mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Define a convenience macro, SYSCTL_OUT_STR() for handling strings the
standard way (including the nulterm byte in the data returned to userland). This augments the existing sysctl_handle_string() in that this can be used with const strings without ugly inappropriate casting.
This commit is contained in:
parent
79565afed8
commit
8a0d2c613b
1 changed files with 1 additions and 0 deletions
|
|
@ -186,6 +186,7 @@ struct sysctl_oid {
|
|||
|
||||
#define SYSCTL_IN(r, p, l) (r->newfunc)(r, p, l)
|
||||
#define SYSCTL_OUT(r, p, l) (r->oldfunc)(r, p, l)
|
||||
#define SYSCTL_OUT_STR(r, p) (r->oldfunc)(r, p, strlen(p) + 1)
|
||||
|
||||
int sysctl_handle_int(SYSCTL_HANDLER_ARGS);
|
||||
int sysctl_msec_to_ticks(SYSCTL_HANDLER_ARGS);
|
||||
|
|
|
|||
Loading…
Reference in a new issue