summaryrefslogtreecommitdiff
path: root/coccinelle
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-11-27 08:47:26 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-11-27 14:35:20 +0900
commit61c26ca87f510e9fb871093e205a33f83afabbfd (patch)
tree14eabe3cbaab7cfcc3fd42857ee973e100759c98 /coccinelle
parentba715423fe9be11be6b71019731d4cead3418bfc (diff)
downloadsystemd-61c26ca87f510e9fb871093e205a33f83afabbfd.tar.gz
coccinelle: ignore specific cases to use SYNTHETIC_ERRNO() macro
Diffstat (limited to 'coccinelle')
-rw-r--r--coccinelle/synthetic-errno.cocci6
1 files changed, 6 insertions, 0 deletions
diff --git a/coccinelle/synthetic-errno.cocci b/coccinelle/synthetic-errno.cocci
index 3d9af0db21..dcae069f74 100644
--- a/coccinelle/synthetic-errno.cocci
+++ b/coccinelle/synthetic-errno.cocci
@@ -15,9 +15,15 @@ log_debug("Found no default boot entry :(");
expression e;
expression list args;
@@
+(
+/* Ignore specific cases in src/import/{export,import,pull}.c where we want to return positive value on success. */
+log_info("Exiting.");
+return -r;
+|
- log_info(args);
- return -e;
+ return log_info_errno(SYNTHETIC_ERRNO(e), args);
+)
@@
expression e;
expression list args;