paul@236 | 1 | -- vim:set ft=lua: |
paul@236 | 2 | |
paul@236 | 3 | local L4 = require("L4"); |
paul@236 | 4 | |
paul@236 | 5 | local l = L4.default_loader; |
paul@236 | 6 | |
paul@236 | 7 | local pipe_server = l:new_channel(); |
paul@236 | 8 | |
paul@236 | 9 | l:startv({ |
paul@236 | 10 | caps = { |
paul@236 | 11 | server = pipe_server:svr(), |
paul@236 | 12 | }, |
paul@236 | 13 | log = { "pipes", "r" }, |
paul@236 | 14 | }, |
paul@236 | 15 | "rom/dstest_pipe_server", "10"); |
paul@236 | 16 | |
paul@236 | 17 | local block_server = l:new_channel(); |
paul@236 | 18 | |
paul@236 | 19 | l:startv({ |
paul@236 | 20 | caps = { |
paul@236 | 21 | server = block_server:svr(), |
paul@236 | 22 | }, |
paul@236 | 23 | log = { "blocksvr", "r" }, |
paul@236 | 24 | }, |
paul@236 | 25 | "rom/dstest_block_server", "10"); |
paul@236 | 26 | |
paul@236 | 27 | local ext2svr = l:new_channel(); |
paul@236 | 28 | |
paul@236 | 29 | l:startv({ |
paul@236 | 30 | caps = { |
paul@236 | 31 | blocksvr = block_server, |
paul@236 | 32 | pipes = pipe_server, |
paul@236 | 33 | ext2svr = ext2svr:svr(), |
paul@236 | 34 | }, |
paul@236 | 35 | log = { "ext2svr", "y" }, |
paul@236 | 36 | }, |
paul@236 | 37 | "rom/dstest_ext2_server", "blocksvr", "rom/e2test.fs", "10", "ext2svr"); |
paul@236 | 38 | |
paul@236 | 39 | -- Obtain user filesystems with umask 0022 (18). |
paul@236 | 40 | |
paul@236 | 41 | local open_for_user = 6; |
paul@236 | 42 | local ext2svr_paulb = L4.cast(L4.Proto.Factory, ext2svr):create(open_for_user, 1000, 1000, 18); |
paul@236 | 43 | |
paul@236 | 44 | l:startv({ |
paul@236 | 45 | caps = { |
paul@236 | 46 | server = ext2svr_paulb, |
paul@236 | 47 | }, |
paul@236 | 48 | log = { "client", "g" }, |
paul@236 | 49 | }, |
paul@236 | 50 | -- program, directory to read |
paul@236 | 51 | "rom/dstest_file_rename", "home/paulb/many"); |