aboutsummaryrefslogtreecommitdiff
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
parentcoccinelle: make use of SYNTHETIC_ERRNO (diff)
downloadsystemd-886cf317c4cace1874e251e54bfe5d1e01d6591a.tar.gz
systemd-886cf317c4cace1874e251e54bfe5d1e01d6591a.tar.bz2
systemd-886cf317c4cace1874e251e54bfe5d1e01d6591a.zip
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 c5533dd7f..645bfc945 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);