mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 10:21:45 -04:00
Get rid of remaining "match start" component.list
calls in BIOS/OpenOS, fixes #1255.
This commit is contained in:
parent
4cb81b32f5
commit
f8b0995b07
@ -9,7 +9,7 @@ local args, options = shell.parse(...)
|
|||||||
|
|
||||||
local fromAddress = options.from and component.get(options.from) or filesystem.get(os.getenv("_")).address
|
local fromAddress = options.from and component.get(options.from) or filesystem.get(os.getenv("_")).address
|
||||||
local candidates = {}
|
local candidates = {}
|
||||||
for address in component.list("filesystem") do
|
for address in component.list("filesystem", true) do
|
||||||
local dev = component.proxy(address)
|
local dev = component.proxy(address)
|
||||||
if not dev.isReadOnly() and dev.address ~= computer.tmpAddress() and dev.address ~= fromAddress then
|
if not dev.isReadOnly() and dev.address ~= computer.tmpAddress() and dev.address ~= fromAddress then
|
||||||
table.insert(candidates, dev)
|
table.insert(candidates, dev)
|
||||||
|
@ -116,7 +116,7 @@ end
|
|||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
for address in component.list('screen') do
|
for address in component.list('screen', true) do
|
||||||
if #component.invoke(address,'getKeyboards') > 0 then
|
if #component.invoke(address,'getKeyboards') > 0 then
|
||||||
component.setPrimary('screen',address)
|
component.setPrimary('screen',address)
|
||||||
end
|
end
|
||||||
|
@ -28,8 +28,8 @@ do
|
|||||||
function rom.inits() return ipairs(rom.invoke("list", "boot")) end
|
function rom.inits() return ipairs(rom.invoke("list", "boot")) end
|
||||||
function rom.isDirectory(path) return rom.invoke("isDirectory", path) end
|
function rom.isDirectory(path) return rom.invoke("isDirectory", path) end
|
||||||
|
|
||||||
local screen = component.list('screen')()
|
local screen = component.list('screen', true)()
|
||||||
for address in component.list('screen') do
|
for address in component.list('screen', true) do
|
||||||
if #component.invoke(address, 'getKeyboards') > 0 then
|
if #component.invoke(address, 'getKeyboards') > 0 then
|
||||||
screen = address
|
screen = address
|
||||||
end
|
end
|
||||||
|
@ -242,7 +242,7 @@ end
|
|||||||
function filesystem.proxy(filter)
|
function filesystem.proxy(filter)
|
||||||
checkArg(1, filter, "string")
|
checkArg(1, filter, "string")
|
||||||
local address
|
local address
|
||||||
for c in component.list("filesystem") do
|
for c in component.list("filesystem", true) do
|
||||||
if component.invoke(c, "getLabel") == filter then
|
if component.invoke(c, "getLabel") == filter then
|
||||||
address = c
|
address = c
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user