diff options
author | Stefan Eßer <se@FreeBSD.org> | 2020-10-30 18:48:09 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2020-10-30 18:48:09 +0000 |
commit | 147eea393fdafa921e49bdb8cccfede3ba04547a (patch) | |
tree | 1cec88df2744ec8c9244223ae428272c3c739bee /lib | |
parent | e0f9cec7d6e1debaf5f164453fcb79a5835d97d9 (diff) | |
download | src-test2-147eea393fdafa921e49bdb8cccfede3ba04547a.tar.gz src-test2-147eea393fdafa921e49bdb8cccfede3ba04547a.zip |
Notes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/sysctl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libc/gen/sysctl.c b/lib/libc/gen/sysctl.c index 274e199dad5f..4495010332c8 100644 --- a/lib/libc/gen/sysctl.c +++ b/lib/libc/gen/sysctl.c @@ -87,6 +87,15 @@ sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp, if (oldp != NULL) memmove(oldp, _PATH_STDPATH, sizeof(_PATH_STDPATH)); return (0); + case USER_LOCALBASE: + if (oldp && orig_oldlen < sizeof(_PATH_LOCALBASE)) { + errno = ENOMEM; + return -1; + } + *oldlenp = sizeof(_PATH_LOCALBASE); + if (oldp != NULL) + memmove(oldp, _PATH_LOCALBASE, sizeof(_PATH_LOCALBASE)); + return(0); } if (oldp && *oldlenp < sizeof(int)) { |