ソースを参照

service/tape-iofs.lua

added a service to make an iofs node for each tape drive attached to the system, as /iofs/tapeN
pull/1/head
XeonSquared 4年前
コミット
77ceb65be6
1個のファイルの変更8行の追加0行の削除
  1. +8
    -0
      service/tape-iofs.lua

+ 8
- 0
service/tape-iofs.lua ファイルの表示

@@ -0,0 +1,8 @@
local counter = 0
for addr in component.list("tape_drive") do
iofs.register("tape"..tonumber(counter),function()
local tape = component.proxy(addr)
return tape.read, tape.write, function() end, tape.seek
end)
counter = counter + 1
end

読み込み中…
キャンセル
保存