diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2025-02-18 22:02:19 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2025-02-18 22:03:33 +0000 |
| commit | 9355ad0b0bfaba9dc39972819185a7dc787a8950 (patch) | |
| tree | b0283bd88f8c49ab069903b63b14b5a530fad733 /sys/tools | |
| parent | f29905cab576a0ccf454ee2e215f590e0e656d70 (diff) | |
Diffstat (limited to 'sys/tools')
| -rw-r--r-- | sys/tools/syscalls/examples/cpp/syscalls.conf | 1 | ||||
| -rw-r--r-- | sys/tools/syscalls/examples/cpp/test_syscalls.map | 18 | ||||
| -rwxr-xr-x | sys/tools/syscalls/scripts/syscalls_map.lua | 4 |
3 files changed, 22 insertions, 1 deletions
diff --git a/sys/tools/syscalls/examples/cpp/syscalls.conf b/sys/tools/syscalls/examples/cpp/syscalls.conf index 7fc15b6bb01f..ffcfa8d4c6aa 100644 --- a/sys/tools/syscalls/examples/cpp/syscalls.conf +++ b/sys/tools/syscalls/examples/cpp/syscalls.conf @@ -7,4 +7,5 @@ syscallprefix="TEST_SYS_" switchname="test_sysent" namesname="test_syscallnames" systrace="test_systrace_args.c" +libsysmap="test_syscalls.map" compat_set="" diff --git a/sys/tools/syscalls/examples/cpp/test_syscalls.map b/sys/tools/syscalls/examples/cpp/test_syscalls.map new file mode 100644 index 000000000000..137496186402 --- /dev/null +++ b/sys/tools/syscalls/examples/cpp/test_syscalls.map @@ -0,0 +1,18 @@ +/* + * FreeBSD system call symbols. + * + * DO NOT EDIT-- this file is automatically @generated. + */ + +FBSDprivate_1.0 { +#ifdef PLATFORM_FOO + _syscall1; + __sys_syscall1; +#else +#endif +#ifdef PLATFORM_FOO +#else + _syscall2; + __sys_syscall2; +#endif +}; diff --git a/sys/tools/syscalls/scripts/syscalls_map.lua b/sys/tools/syscalls/scripts/syscalls_map.lua index 023b43052921..52c3b294e338 100755 --- a/sys/tools/syscalls/scripts/syscalls_map.lua +++ b/sys/tools/syscalls/scripts/syscalls_map.lua @@ -37,7 +37,7 @@ function syscalls_map.generate(tbl, config, fh) gen:write(string.format("FBSDprivate_1.0 {\n")) for _, v in pairs(s) do - --print("num " .. v.num .. " name " .. v.name) + gen:write(v.prolog) if v:native() and not v.type.NODEF and not v.type.NOLIB then if v.name ~= "exit" and v.name ~= "vfork" then gen:write(string.format("\t_%s;\n", v.name)) @@ -45,6 +45,8 @@ function syscalls_map.generate(tbl, config, fh) gen:write(string.format("\t__sys_%s;\n", v.name)) end end + gen:write(tbl.epilog) + -- End gen:write("};\n") end |
