diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2019-12-16 20:07:04 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2019-12-16 20:07:04 +0000 |
commit | b5f20658ee91b62296384ec68cd1fc82a4fbe4bb (patch) | |
tree | 5b5fbf88c8878ba6b1bf665ea0486f39508e70b4 /sys/compat/linux/linux_util.c | |
parent | 83b75bb3cc228e2ab9f68976b820b7bb76caa9c7 (diff) |
Add compat.linux.emul_path, so it can be set to something other
than "/compat/linux". Useful when you have several compat directories
with different Linux versions and you don't want to clash with files
installed by linux-c7 packages.
Reviewed by: bcr (manpages)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22574
Notes
Notes:
svn path=/head/; revision=355818
Diffstat (limited to 'sys/compat/linux/linux_util.c')
-rw-r--r-- | sys/compat/linux/linux_util.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c index 3b99a94b8a32..54769451d1e5 100644 --- a/sys/compat/linux/linux_util.c +++ b/sys/compat/linux/linux_util.c @@ -46,11 +46,13 @@ __FBSDID("$FreeBSD$"); #include <sys/proc.h> #include <sys/sdt.h> #include <sys/syscallsubr.h> +#include <sys/sysctl.h> #include <sys/systm.h> #include <sys/vnode.h> #include <machine/stdarg.h> +#include <compat/linux/linux_mib.h> #include <compat/linux/linux_util.h> MALLOC_DEFINE(M_LINUX, "linux", "Linux mode structures"); @@ -58,7 +60,11 @@ MALLOC_DEFINE(M_EPOLL, "lepoll", "Linux events structures"); MALLOC_DEFINE(M_FUTEX, "futex", "Linux futexes"); MALLOC_DEFINE(M_FUTEX_WP, "futex wp", "Linux futex waiting proc"); -const char linux_emul_path[] = "/compat/linux"; +char linux_emul_path[MAXPATHLEN] = "/compat/linux"; + +SYSCTL_STRING(_compat_linux, OID_AUTO, emul_path, CTLFLAG_RWTUN, + linux_emul_path, sizeof(linux_emul_path), + "Linux runtime environment path"); /* * Search an alternate path before passing pathname arguments on to |