aboutgitcodelistschat:MatrixIRC
path: root/demo/mknod.hjson
blob: b61fb7aa921c49a51eb5c1e760fb81386580bc4b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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
 */