Page MenuHomeFreeBSD

D27009.diff
No OneTemporary

D27009.diff

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

Mime Type
text/plain
Expires
Sun, Jan 19, 10:25 AM (15 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15939002
Default Alt Text
D27009.diff (1 KB)

Event Timeline