Page MenuHomeFreeBSD

D33356.id99758.diff
No OneTemporary

D33356.id99758.diff

Index: sys/compat/freebsd32/syscalls.conf
===================================================================
--- sys/compat/freebsd32/syscalls.conf
+++ sys/compat/freebsd32/syscalls.conf
@@ -9,6 +9,7 @@
switchname="freebsd32_sysent"
namesname="freebsd32_syscallnames"
systrace="freebsd32_systrace_args.c"
+compat_set="native"
abi_flags="long_size|pointer_size|time_t_size|pair_64bit"
abi_func_prefix="freebsd32_"
abi_type_suffix="32"
Index: sys/kern/Makefile
===================================================================
--- sys/kern/Makefile
+++ sys/kern/Makefile
@@ -3,7 +3,6 @@
#
# Makefile for init_sysent
-SYSENT_CONF=
GENERATED= init_sysent.c \
syscalls.c \
systrace_args.c \
Index: sys/kern/syscalls.conf
===================================================================
--- /dev/null
+++ sys/kern/syscalls.conf
@@ -0,0 +1 @@
+compat_set="native"
Index: sys/tools/makesyscalls.lua
===================================================================
--- sys/tools/makesyscalls.lua
+++ sys/tools/makesyscalls.lua
@@ -56,6 +56,7 @@
systrace = "systrace_args.c",
capabilities_conf = "capabilities.conf",
capenabled = {},
+ compat_set = "",
mincompat = 0,
abi_type_suffix = "",
abi_flags = "",
@@ -201,7 +202,7 @@
-- Compat flags start from here. We have plenty of space.
}
--- All compat_options entries should have five entries:
+-- All compat option entries should have five entries:
-- definition: The preprocessor macro that will be set for this
-- compatlevel: The level this compatibility should be included at. This
-- generally represents the version of FreeBSD that it is compatible
@@ -212,23 +213,28 @@
-- used as-is, without "_" or any other character appended.
-- descr: The description of this compat option in init_sysent.c comments.
-- The special "stdcompat" entry will cause the other five to be autogenerated.
-local compat_options = {
- {
- definition = "COMPAT_43",
- compatlevel = 3,
- flag = "COMPAT",
- prefix = "o",
- descr = "old",
+local compat_option_sets = {
+ native = {
+ {
+ definition = "COMPAT_43",
+ compatlevel = 3,
+ flag = "COMPAT",
+ prefix = "o",
+ descr = "old",
+ },
+ { stdcompat = "FREEBSD4" },
+ { stdcompat = "FREEBSD6" },
+ { stdcompat = "FREEBSD7" },
+ { stdcompat = "FREEBSD10" },
+ { stdcompat = "FREEBSD11" },
+ { stdcompat = "FREEBSD12" },
+ { stdcompat = "FREEBSD13" },
},
- { stdcompat = "FREEBSD4" },
- { stdcompat = "FREEBSD6" },
- { stdcompat = "FREEBSD7" },
- { stdcompat = "FREEBSD10" },
- { stdcompat = "FREEBSD11" },
- { stdcompat = "FREEBSD12" },
- { stdcompat = "FREEBSD13" },
}
+-- compat_options will be resolved to a set from the configuration.
+local compat_options
+
local function trim(s, char)
if s == nil then
return nil
@@ -1336,6 +1342,17 @@
end
end
+local compat_set = config['compat_set']
+if compat_set ~= "" then
+ if not compat_option_sets[compat_set] then
+ abort(1, "Undefined compat set: " .. compat_set)
+ end
+
+ compat_options = compat_option_sets[compat_set]
+else
+ compat_options = {}
+end
+
-- We ignore errors here if we're relying on the default configuration.
if not config_modified["capenabled"] then
config["capenabled"] = grab_capenabled(config['capabilities_conf'],

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 8, 8:38 PM (2 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15723549
Default Alt Text
D33356.id99758.diff (3 KB)

Event Timeline