summaryrefslogtreecommitdiff
path: root/coccinelle
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-11-21 08:23:20 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-11-22 10:54:38 +0100
commit886cf317c4cace1874e251e54bfe5d1e01d6591a (patch)
tree5befb8cce9b07e1975783309ea1529d4fe5b80b0 /coccinelle
parentbaaa35ad706419ae5aacc11d2bece5bd8b73ee42 (diff)
downloadsystemd-886cf317c4cace1874e251e54bfe5d1e01d6591a.tar.gz
coccinelle: also mark previous synthetic errnos as such
Diffstat (limited to 'coccinelle')
-rw-r--r--coccinelle/synthetic-errno.cocci7
1 files changed, 7 insertions, 0 deletions
diff --git a/coccinelle/synthetic-errno.cocci b/coccinelle/synthetic-errno.cocci
index c5533dd7fb..645bfc945f 100644
--- a/coccinelle/synthetic-errno.cocci
+++ b/coccinelle/synthetic-errno.cocci
@@ -33,3 +33,10 @@ expression list args;
- log_emergency(args);
- return -e;
+ return log_emergency_errno(SYNTHETIC_ERRNO(e), args);
+@@
+identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_errno$";
+identifier ERRNO =~ "^E[A-Z]+$";
+expression list args;
+@@
+- return log_LEVEL_errno(ERRNO, args);
++ return log_LEVEL_errno(SYNTHETIC_ERRNO(ERRNO), args);