diff --git a/module/devfs.lua b/module/devfs.lua index 980dff1..64630d7 100644 --- a/module/devfs.lua +++ b/module/devfs.lua @@ -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 diff --git a/module/fs.lua b/module/fs.lua index b044a57..b99ed6a 100644 --- a/module/fs.lua +++ b/module/fs.lua @@ -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())