]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - coccinelle/synthetic-errno.cocci
coccinelle: ignore specific cases to use SYNTHETIC_ERRNO() macro
[thirdparty/systemd.git] / coccinelle / synthetic-errno.cocci
index 3d9af0db21bb80f02828eb6419ea5b21529d394a..dcae069f748664fffaaa930562c7ebf00ee97c4a 100644 (file)
@@ -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;