]> git.ipfire.org Git - thirdparty/systemd.git/blame - coccinelle/synthetic-errno.cocci
coccinelle: exclude JsonVariant* from the IN_SET transformation
[thirdparty/systemd.git] / coccinelle / synthetic-errno.cocci
CommitLineData
baaa35ad
ZJS
1@@
2expression e;
3expression list args;
4@@
5- log_debug(args);
6- return -e;
7+ return log_debug_errno(SYNTHETIC_ERRNO(e), args);
8@@
9expression e;
10expression list args;
11@@
12- log_info(args);
13- return -e;
14+ return log_info_errno(SYNTHETIC_ERRNO(e), args);
15@@
16expression e;
17expression list args;
18@@
19- log_notice(args);
20- return -e;
21+ return log_notice_errno(SYNTHETIC_ERRNO(e), args);
22@@
23expression e;
24expression list args;
25@@
26- log_error(args);
27- return -e;
28+ return log_error_errno(SYNTHETIC_ERRNO(e), args);
29@@
30expression e;
31expression list args;
32@@
33- log_emergency(args);
34- return -e;
35+ return log_emergency_errno(SYNTHETIC_ERRNO(e), args);
886cf317
ZJS
36@@
37identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_errno$";
38identifier ERRNO =~ "^E[A-Z]+$";
39expression list args;
40@@
41- return log_LEVEL_errno(ERRNO, args);
42+ return log_LEVEL_errno(SYNTHETIC_ERRNO(ERRNO), args);