From 6c808e75c164da80c40668adbd3d16be8a2177e3 Mon Sep 17 00:00:00 2001 From: Vexatos Date: Fri, 19 Jun 2015 18:32:31 +0200 Subject: [PATCH] Update init.lua --- .../resources/assets/opencomputers/loot/Plan9k/init.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/resources/assets/opencomputers/loot/Plan9k/init.lua b/src/main/resources/assets/opencomputers/loot/Plan9k/init.lua index 588b8d0e3..fa1c76183 100644 --- a/src/main/resources/assets/opencomputers/loot/Plan9k/init.lua +++ b/src/main/resources/assets/opencomputers/loot/Plan9k/init.lua @@ -83,6 +83,11 @@ local function boot(kernel) dofile(kernel.address, kernel.fpx .. kernel.file) end +local function labelText(fs) + local lbl = component.invoke(fs, "getLabel") + if lbl then return " ('"..lbl.."')" else return "" end +end + status(_OSVERSION) status("Select what to boot:") @@ -92,7 +97,7 @@ for fs in component.list("filesystem") do if component.invoke(fs, "isDirectory", "boot/kernel/")then for _,file in ipairs(component.invoke(fs, "list", "boot/kernel/")) do osList[#osList+1] = {fpx = "boot/kernel/", file = file, address = fs} - status(tostring(#osList).."."..file.." from "..(fs:sub(1,3))) + status(tostring(#osList).."."..file.." from "..(fs:sub(1,3))..labelText(fs)) end end if fs ~= computer.getBootAddress() and component.invoke(fs, "exists", "init.lua") then @@ -104,7 +109,7 @@ for fs in component.list("filesystem") do end) end osList[#osList+1] = {fpx = "", file = "init.lua", address = fs} - status(tostring(#osList).."."..osName.." from "..(fs:sub(1,3))) + status(tostring(#osList).."."..osName.." from "..(fs:sub(1,3))..labelText(fs)) end end status("Select os: ")