forked from Hyperion/HyperionOS
Potential windows case insensitive filesystem issue fix
This commit is contained in:
@@ -33,7 +33,6 @@ local host_str = syscall.getHost() or "Unknown"
|
||||
local cc_ver = host_str:match("ComputerCraft ([%d%.]+)") or host_str
|
||||
|
||||
local info = {
|
||||
-- {label, value} label=nil means print value as-is (userhost / separator)
|
||||
{nil, userhost},
|
||||
{nil, string.rep("-", #userhost)},
|
||||
{"OS", syscall.version() or "Unknown"},
|
||||
@@ -42,7 +41,7 @@ local info = {
|
||||
{"Uptime", formatUptime(syscall.getUptime() or 0)},
|
||||
{"Tasks", tostring(#(syscall.getTasks() or {}))},
|
||||
{"Shell", syscall.getEnviron("SHELL") or "Unknown"},
|
||||
{"Terminal", "TTY1"},
|
||||
{"Terminal", "tty1"},
|
||||
{"UID", tostring(syscall.getuid())},
|
||||
{"Packages", "n/a (spm)"},
|
||||
}
|
||||
@@ -71,15 +70,12 @@ local lines = math.max(#logo, #info)
|
||||
for i = 1, lines do
|
||||
local logo_str = logo[i] or string.rep(" ", 36)
|
||||
|
||||
-- print logo segment in cyan
|
||||
c(C_LOGO)
|
||||
printInline(logo_str)
|
||||
|
||||
-- print separator pipe
|
||||
c(C_LABEL)
|
||||
printInline("| ")
|
||||
|
||||
-- print info segment
|
||||
local row = info[i]
|
||||
if row then
|
||||
if row[1] == nil and i == 1 then
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--:Minify:--
|
||||
syscall.open("/dev/tty/TTY1","r") --stdin (Device 0)
|
||||
syscall.open("/dev/tty/TTY1","w") --stdout (Device 1)
|
||||
syscall.open("/dev/tty/tty1","r") --stdin (Device 0)
|
||||
syscall.open("/dev/tty/tty1","w") --stdout (Device 1)
|
||||
syscall.open("/dev/null","w") --stderr (device 2)
|
||||
|
||||
local success, errorMsg = xpcall(function()
|
||||
@@ -957,8 +957,8 @@ local function runCommand(command)
|
||||
end
|
||||
|
||||
local proc = syscall.spawn(function(...)
|
||||
syscall.open("/dev/tty/TTY1","r")
|
||||
syscall.open("/dev/tty/TTY1","w")
|
||||
syscall.open("/dev/tty/tty1","r")
|
||||
syscall.open("/dev/tty/tty1","w")
|
||||
syscall.open("/dev/null","w")
|
||||
local ok2, msg = pcall(program, ...)
|
||||
if not ok2 then printError(progName, msg) end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--:Minify:--
|
||||
syscall.open("/dev/tty/TTY1","r")
|
||||
syscall.open("/dev/tty/TTY1","w")
|
||||
syscall.open("/dev/tty/tty1","r")
|
||||
syscall.open("/dev/tty/tty1","w")
|
||||
syscall.open("/dev/null","r")
|
||||
syscall.devctl(1,"clear")
|
||||
syscall.devctl(1,"sfgc",1)
|
||||
@@ -57,8 +57,8 @@ while true do
|
||||
printInline("> ")
|
||||
end
|
||||
proc = syscall.spawn(function(...)
|
||||
syscall.open("/dev/tty/TTY1","r")
|
||||
syscall.open("/dev/tty/TTY1","w")
|
||||
syscall.open("/dev/tty/tty1","r")
|
||||
syscall.open("/dev/tty/tty1","w")
|
||||
syscall.open("/dev/null","w")
|
||||
program(...)
|
||||
end, path, nil, {table.unpack(split, 2)})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--:Minify:--
|
||||
syscall.open("/dev/tty/TTY1", "r") --stdin (fd 0)
|
||||
syscall.open("/dev/tty/TTY1", "w") --stdout (fd 1)
|
||||
syscall.open("/dev/tty/tty1", "r") --stdin (fd 0)
|
||||
syscall.open("/dev/tty/tty1", "w") --stdout (fd 1)
|
||||
syscall.open("/dev/null", "w") --stderr (fd 2)
|
||||
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@ local function normalizePath(path)
|
||||
table.remove(stack)
|
||||
end
|
||||
else
|
||||
comp = comp:lower()
|
||||
if not comp:match(SAFE_COMPONENT_PATTERN) then
|
||||
error("EINVAL: illegal characters in path component: " .. comp, 2)
|
||||
end
|
||||
@@ -385,11 +385,11 @@ kernel.processes.cctmond = function()
|
||||
end
|
||||
end
|
||||
|
||||
newtty(apis.term, "TTY1", fifo.pop)
|
||||
newtty(apis.term, "tty1", fifo.pop)
|
||||
|
||||
|
||||
for i,v in ipairs({peripheral.find("monitor")}) do
|
||||
v.setTextScale(.5)
|
||||
v.write("Initializing...")
|
||||
newtty(v,"TTY"..tostring(i+1),function () end)
|
||||
newtty(v,"tty"..tostring(i+1),function () end)
|
||||
end
|
||||
@@ -193,10 +193,10 @@ mergeMeta("/lib/sys", {
|
||||
})
|
||||
|
||||
mergeMeta("/lib/modules", {
|
||||
{"Hyperion", REG, 0, 0, RWX_RX_RX},
|
||||
{"hyperion", REG, 0, 0, RWX_RX_RX},
|
||||
})
|
||||
|
||||
mergeMeta("/lib/modules/Hyperion", {
|
||||
mergeMeta("/lib/modules/hyperion", {
|
||||
{"01_stdlib.kmod", REG, 0, 0, RW_R_R},
|
||||
{"10_vfs.kmod", REG, 0, 0, RW_R_R},
|
||||
{"11_require.kmod", REG, 0, 0, RW_R_R},
|
||||
Reference in New Issue
Block a user