forked from izaya/OC-PsychOS2
made the devfs module provide saner respones to some queries
This commit is contained in:
parent
98e3581e6e
commit
5f8e4efe33
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user