From 8b29e472f8843c03633f41d6d4fc689c7cf484d8 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Thu, 26 Mar 2020 17:25:36 +1100 Subject: [PATCH] fix some fs informational problems --- module/devfs.lua | 2 ++ module/fs.lua | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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())