summaryrefslogtreecommitdiff
path: root/coccinelle/synthetic-errno.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'coccinelle/synthetic-errno.cocci')
-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);