Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107821212
D27009.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27009.diff
View Options
Index: head/lib/libc/gen/sysctl.c
===================================================================
--- head/lib/libc/gen/sysctl.c
+++ head/lib/libc/gen/sysctl.c
@@ -87,6 +87,15 @@
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)) {
Index: head/sys/kern/kern_mib.c
===================================================================
--- head/sys/kern/kern_mib.c
+++ head/sys/kern/kern_mib.c
@@ -652,6 +652,8 @@
SYSCTL_NULL_INT_PTR, 0, "Min Maximum number of streams a process may have open at one time");
SYSCTL_INT(_user, USER_TZNAME_MAX, tzname_max, CTLFLAG_RD,
SYSCTL_NULL_INT_PTR, 0, "Min Maximum number of types supported for timezone names");
+SYSCTL_STRING(_user, USER_LOCALBASE, localbase, CTLFLAG_RD,
+ "", 0, "Prefix used to install and locate add-on packages");
#include <sys/vnode.h>
SYSCTL_INT(_debug_sizeof, OID_AUTO, vnode, CTLFLAG_RD,
Index: head/sys/sys/sysctl.h
===================================================================
--- head/sys/sys/sysctl.h
+++ head/sys/sys/sysctl.h
@@ -1070,6 +1070,7 @@
#define USER_POSIX2_UPE 18 /* int: POSIX2_UPE */
#define USER_STREAM_MAX 19 /* int: POSIX2_STREAM_MAX */
#define USER_TZNAME_MAX 20 /* int: POSIX2_TZNAME_MAX */
+#define USER_LOCALBASE 21 /* string: _PATH_LOCALBASE */
#define CTL_P1003_1B_ASYNCHRONOUS_IO 1 /* boolean */
#define CTL_P1003_1B_MAPPED_FILES 2 /* boolean */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 19, 12:21 PM (17 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15939002
Default Alt Text
D27009.diff (1 KB)
Attached To
Mode
D27009: Make LOCALBASE available as a sysctl value
Attached
Detach File
Event Timeline
Log In to Comment