1
1
mirror of https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-11-25 20:48:43 -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() local function rfalse()
return false return false
end end
local function rzero()
return 0
end
function devfs.component.getLabel() function devfs.component.getLabel()
return "devfs" return "devfs"
end 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) function devfs.component.exists(fname)
return devfs.files[fname] ~= nil return devfs.files[fname] ~= nil