diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-11-27 00:47:26 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-11-27 06:35:20 +0100 |
commit | 61c26ca87f510e9fb871093e205a33f83afabbfd (patch) | |
tree | 14eabe3cbaab7cfcc3fd42857ee973e100759c98 /coccinelle/synthetic-errno.cocci | |
parent | cryptsetup: drop unnecessary bracket (diff) | |
download | systemd-61c26ca87f510e9fb871093e205a33f83afabbfd.tar.xz systemd-61c26ca87f510e9fb871093e205a33f83afabbfd.zip |
coccinelle: ignore specific cases to use SYNTHETIC_ERRNO() macro
Diffstat (limited to '')
-rw-r--r-- | coccinelle/synthetic-errno.cocci | 6 |
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; |