aboutgitcodelistschat:MatrixIRC
path: root/demo/mknod_cont.hjson
diff options
context:
space:
mode:
Diffstat (limited to 'demo/mknod_cont.hjson')
-rw-r--r--demo/mknod_cont.hjson63
1 files changed, 63 insertions, 0 deletions
diff --git a/demo/mknod_cont.hjson b/demo/mknod_cont.hjson
new file mode 100644
index 0000000..71f41d0
--- /dev/null
+++ b/demo/mknod_cont.hjson
@@ -0,0 +1,63 @@
+[
+ {
+ "match": [
+ { "mknodat":
+ { "path": { "tag": "path" },
+ "mode": { "tag": "mode" },
+ "type": { "tag": "type" },
+ "major": 1,
+ "minor": { "value": { "in": [ 3, 5, 7, 8, 9 ] }, "tag": "minor" }
+ }
+ },
+ { "mknod":
+ { "path": { "tag": "path" },
+ "mode": { "tag": "mode" },
+ "type": { "tag": "type" },
+ "major": 1,
+ "minor": { "value": { "in": [ 3, 5, 7, 8, 9 ] }, "tag": "minor" }
+ }
+ }
+ ],
+ "call":
+ { "mknod":
+ { "path": { "tag": { "get": "path" } },
+ "mode": { "tag": { "get": "mode" } },
+ "type": { "tag": { "get": "type" } },
+ "major": 1,
+ "minor": { "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
+ */