1
1
mirror of https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-11-22 03:54:20 -05:00

Compare commits

...

2 Commits

Author SHA1 Message Date
XeonSquared
1ef6d5db96 updated fsmanager to new service semantics 2021-06-22 16:39:10 +10:00
XeonSquared
6f1b673bec made liblz16 happier on OpenOS when decompressing smaller files 2021-05-26 17:46:17 +10:00
2 changed files with 5 additions and 2 deletions

View File

@ -13,7 +13,7 @@ local function readBuffer(fi)
if len < 1 then if len < 1 then
return nil return nil
end end
coroutine.yield() if os.sleep then os.sleep(0) else coroutine.yield() end
return lz.decompress(fi:read(len)) return lz.decompress(fi:read(len))
end end
function stream.close() function stream.close()

View File

@ -1,3 +1,4 @@
local fsmanager = {}
local function mount(addr) local function mount(addr)
dest = component.invoke(addr,"getLabel") or "mnt/"..addr:sub(1,3) dest = component.invoke(addr,"getLabel") or "mnt/"..addr:sub(1,3)
dest = "/"..dest dest = "/"..dest
@ -12,7 +13,7 @@ for addr, _ in component.list("filesystem") do
mount(addr) mount(addr)
end end
function start() function fsmanager.start()
return os.spawn(function() return os.spawn(function()
while true do while true do
local tE = {coroutine.yield()} local tE = {coroutine.yield()}
@ -24,3 +25,5 @@ function start()
end end
end,"fsmanager") end,"fsmanager")
end end
return fsmanager