fix some fs informational problems

This commit is contained in:
Izaya 2020-03-26 17:25:36 +11:00
parent 928a1db13c
commit 8b29e472f8
2 changed files with 3 additions and 1 deletions

View File

@ -61,6 +61,8 @@ function devfs.component.seek(fd,...)
end
function devfs.component.remove(fname)
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.
devfs.files[fname] = fopen

View File

@ -111,7 +111,7 @@ function fs.address(path) -- returns the address of the filesystem at a given pa
end
function fs.type(path) -- returns the component type of the filesystem at a given path, if applicable
local fsi,_ = fs.resolve(path)
return fsmounts[fsi].type
return fsmounts[fsi].type or "filesystem"
end
fsmounts["/"] = component.proxy(computer.tmpAddress())