forked from izaya/OC-PsychOS2
fix some fs informational problems
This commit is contained in:
parent
928a1db13c
commit
8b29e472f8
@ -61,6 +61,8 @@ function devfs.component.seek(fd,...)
|
|||||||
end
|
end
|
||||||
function devfs.component.remove(fname)
|
function devfs.component.remove(fname)
|
||||||
end
|
end
|
||||||
|
devfs.component.address = "devfs"
|
||||||
|
devfs.component.type = "devfs"
|
||||||
|
|
||||||
function devfs.register(fname,fopen) -- Register a new devfs node with the name *fname* that will run the function *fopen* when opened. This function should return a function for read, a function for write, function for close, and optionally, a function for seek, in that order.
|
function devfs.register(fname,fopen) -- Register a new devfs node with the name *fname* that will run the function *fopen* when opened. This function should return a function for read, a function for write, function for close, and optionally, a function for seek, in that order.
|
||||||
devfs.files[fname] = fopen
|
devfs.files[fname] = fopen
|
||||||
|
@ -111,7 +111,7 @@ function fs.address(path) -- returns the address of the filesystem at a given pa
|
|||||||
end
|
end
|
||||||
function fs.type(path) -- returns the component type of the filesystem at a given path, if applicable
|
function fs.type(path) -- returns the component type of the filesystem at a given path, if applicable
|
||||||
local fsi,_ = fs.resolve(path)
|
local fsi,_ = fs.resolve(path)
|
||||||
return fsmounts[fsi].type
|
return fsmounts[fsi].type or "filesystem"
|
||||||
end
|
end
|
||||||
|
|
||||||
fsmounts["/"] = component.proxy(computer.tmpAddress())
|
fsmounts["/"] = component.proxy(computer.tmpAddress())
|
||||||
|
Loading…
Reference in New Issue
Block a user