• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1@@
2expression cgn, cgns;
3@@
4
5- cgn = cg_name(..., cgns);
6+ cgn = tst_cgroup_group_mk(cg_test, cgns);
7
8@@
9expression cg, fname, data;
10@@
11
12- if (cg_write(cg, fname, data)) {
13-    ...
14- }
15+ SAFE_CGROUP_PRINT(cg, fname, data);
16
17@@
18expression cg;
19@@
20
21... when != TST_CGROUP_VER(...)
22
23- SAFE_CGROUP_PRINT(cg, "cgroup.subtree_control", "+memory");
24+ if (TST_CGROUP_VER(cg, "memory") != TST_CGROUP_V1)
25+    SAFE_CGROUP_PRINT(cg, "cgroup.subtree_control", "+memory");
26
27@@
28expression cg, fname, needle;
29@@
30
31- cg_read_strstr(cg, fname, needle)
32+ !SAFE_CGROUP_OCCURSIN(cg, fname, needle)
33
34@@
35identifier l;
36expression cg, fname;
37@@
38
39- l = cg_read_long(cg, fname);
40+ SAFE_CGROUP_SCANF(cg, fname, "%ld", &l);
41