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

made the devfs module provide saner respones to some queries

This commit is contained in:
XeonSquared 2019-11-09 13:15:50 +11:00
parent 98e3581e6e
commit 5f8e4efe33

View File

@ -7,10 +7,13 @@ devfs.component = {}
local function rfalse()
return false
end
local function rzero()
return 0
end
function devfs.component.getLabel()
return "devfs"
end
devfs.component.spaceUsed, devfs.component.spaceTotal, devfs.component.isReadOnly, devfs.component.isDirectory,devfs.component.size, devfs.component.setLabel = function() return computer.totalMemory()-computer.freeMemory() end, computer.totalMemory, rfalse, rfalse, rfalse, rfalse
devfs.component.spaceUsed, devfs.component.spaceTotal, devfs.component.isReadOnly, devfs.component.isDirectory,devfs.component.size, devfs.component.setLabel = rzero, rzero, rfalse, rfalse, rzero, rfalse
function devfs.component.exists(fname)
return devfs.files[fname] ~= nil