From 61c26ca87f510e9fb871093e205a33f83afabbfd Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 27 Nov 2020 08:47:26 +0900 Subject: coccinelle: ignore specific cases to use SYNTHETIC_ERRNO() macro --- coccinelle/synthetic-errno.cocci | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'coccinelle') 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; -- cgit v1.2.3