diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2023-06-15 11:54:34 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-06-15 11:56:03 +0200 |
commit | b749e1dcdeba2e670008173f2733dbb8efd7523e (patch) | |
tree | d5595df00b2545b54b8e7541584d95d78f5481cb | |
parent | 279aa30d9960405ce0c43361860bc91880705121 (diff) | |
download | seitan-b749e1dcdeba2e670008173f2733dbb8efd7523e.tar seitan-b749e1dcdeba2e670008173f2733dbb8efd7523e.tar.gz seitan-b749e1dcdeba2e670008173f2733dbb8efd7523e.tar.bz2 seitan-b749e1dcdeba2e670008173f2733dbb8efd7523e.tar.lz seitan-b749e1dcdeba2e670008173f2733dbb8efd7523e.tar.xz seitan-b749e1dcdeba2e670008173f2733dbb8efd7523e.tar.zst seitan-b749e1dcdeba2e670008173f2733dbb8efd7523e.zip |
demo: Add read.hjson example
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | demo/read.hjson | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/demo/read.hjson b/demo/read.hjson new file mode 100644 index 0000000..071ce3a --- /dev/null +++ b/demo/read.hjson @@ -0,0 +1,13 @@ +[ + { + "match": [ + { "read": { "path": "/tmp/abcd2", "buf": { "tag": "buf" }, "count": { "tag": "count" } } } + ], + "call": [ + { "open": { "path": "/tmp/abcd", "flags": "rdonly", "mode": 0 }, "ret": "new_fd" }, + { "read": { "fd": { "tag": { "get": "new_fd" } }, "buf": { "tag": { "set": "new" } }, "count": { "tag": { "get": "count" } } }, "ret": "n" } + ], + "write": { "src": "new", "dst": "buf", "count": "n" }, + "return": { "value": { "tag": "n" } } + } +] |