diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2023-06-06 11:59:16 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-06-06 11:59:16 +0200 |
commit | e2698a0d3e0b20cf770dbb67cbe6c7643b62f056 (patch) | |
tree | e3619944940b3b6d82234e4e942927fa6ee77f5e | |
parent | e5a1983e4384a44e45486fb9a48bdba375a529b6 (diff) | |
download | seitan-e2698a0d3e0b20cf770dbb67cbe6c7643b62f056.tar seitan-e2698a0d3e0b20cf770dbb67cbe6c7643b62f056.tar.gz seitan-e2698a0d3e0b20cf770dbb67cbe6c7643b62f056.tar.bz2 seitan-e2698a0d3e0b20cf770dbb67cbe6c7643b62f056.tar.lz seitan-e2698a0d3e0b20cf770dbb67cbe6c7643b62f056.tar.xz seitan-e2698a0d3e0b20cf770dbb67cbe6c7643b62f056.tar.zst seitan-e2698a0d3e0b20cf770dbb67cbe6c7643b62f056.zip |
demo: Add mknod.hjson
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | demo/mknod.hjson | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/demo/mknod.hjson b/demo/mknod.hjson new file mode 100644 index 0000000..b61fb7a --- /dev/null +++ b/demo/mknod.hjson @@ -0,0 +1,42 @@ +[ + { + "match": [ /* Giuseppe's example */ + { "mknodat": { "path": { "tag": "path" }, "mode": 8630, "major": 1, "minor": { "value": { "in": [ 3, 5, 7, 8, 9 ] }, "tag": "minor" } } } + ], + "call": { + "mknod": { "path": { "tag": { "get": "path" } }, "mode": 8630, "major": 1, "minor": 7 /* { "tag": { "get": "minor" } }*/ }, + "ret": "x"/*, + "context": { "user": "init", "mnt": "caller" }*/ + }, + "return": { "tag": "x" } + } +] + +/* + * INTFLAGS, LONGFLAGS, U32FLAGS + * + * "field": { "in": [ "ipc", "mount", "uts" ] } + * flags & set + * !!(flags & (ipc | mount | ns)) + * + * "field": { "all": [ "ipc", "mount", "uts" ] } + * flags & set == set + * flags & (ipc | mount | ns) == (ipc | mount | ns) + * + * "field": { "not": [ "ipc", "mount", "uts" ] } + * !(flags & set) + * + * "field": { "ipc": false, "mount": true, "uts": false } + * flags & set == set + * !(flags & ipc) && (flags & mount) && !(flags & utc) + * + * "field": { "ipc" } + * flags == ipc + * + * INTMASK + * value = (target value & known values) + * + * INT, LONG, U32 + * "arg": { "in": [ 0, 1 ] } + * arg == 0 || arg == 1 + */ |