Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150665935
D23098.id66529.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
D23098.id66529.diff
View Options
Index: sys/tools/makesyscalls.lua
===================================================================
--- sys/tools/makesyscalls.lua
+++ sys/tools/makesyscalls.lua
@@ -66,13 +66,13 @@
local cleantmp = true
local tmpspace = "/tmp/sysent." .. unistd.getpid() .. "/"
--- These ones we'll open in place
-local config_files_needed = {
+local output_files = {
"sysnames",
"syshdr",
"sysmk",
"syssw",
"systrace",
+ "sysproto",
}
-- These ones we'll create temporary files for; generation purposes.
@@ -1158,9 +1158,9 @@
files[v] = io.open(tmpname, "w+")
end
-
-for _, v in ipairs(config_files_needed) do
- files[v] = io.open(config[v], "w+")
+for _, v in ipairs(output_files) do
+ local tmpname = tmpspace .. v
+ files[v] = io.open(tmpname, "w+")
end
-- Write out all of the preamble bits
@@ -1343,18 +1343,28 @@
write_line("syssw", read_file("sysinc"))
write_line("syssw", read_file("sysent"))
-local fh = io.open(config["sysproto"], "w+")
-fh:write(read_file("sysarg"))
-fh:write(read_file("sysdcl"))
+write_line("sysproto", read_file("sysarg"))
+write_line("sysproto", read_file("sysdcl"))
for _, v in pairs(compat_options) do
- fh:write(read_file(v["tmp"]))
- fh:write(read_file(v["dcltmp"]))
+ write_line("sysproto", read_file(v["tmp"]))
+ write_line("sysproto", read_file(v["dcltmp"]))
end
-fh:write(read_file("sysaue"))
-fh:write(read_file("sysprotoend"))
-fh:close()
+write_line("sysproto", read_file("sysaue"))
+write_line("sysproto", read_file("sysprotoend"))
write_line("systrace", read_file("systracetmp"))
write_line("systrace", read_file("systraceret"))
+for _, v in ipairs(output_files) do
+ local target = config[v]
+ if target ~= "/dev/null" then
+ local fh = io.open(target, "w+")
+ if fh == nil then
+ abort(1, "Failed to open '" .. target .. "'")
+ end
+ fh:write(read_file(v))
+ fh:close()
+ end
+end
+
cleanup()
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 5:17 AM (1 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30800892
Default Alt Text
D23098.id66529.diff (1 KB)
Attached To
Mode
D23098: makesyscalls.lua: generate all files in /tmp, write into place at the end
Attached
Detach File
Event Timeline
Log In to Comment