From 77ceb65be66fea46d1ab41dc7edde28cd5d92477 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Sun, 21 Jul 2019 17:46:16 +1000 Subject: [PATCH] service/tape-iofs.lua added a service to make an iofs node for each tape drive attached to the system, as /iofs/tapeN --- service/tape-iofs.lua | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 service/tape-iofs.lua diff --git a/service/tape-iofs.lua b/service/tape-iofs.lua new file mode 100644 index 0000000..4a0a7d1 --- /dev/null +++ b/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