From: Mike Yuan Date: Mon, 31 Mar 2025 16:43:34 +0000 (+0200) Subject: validatefs: do not use EXIT_* in run() X-Git-Tag: v258-rc1~978^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8950f7651e6165e92cafb2f0b33752db4e7afd0c;p=thirdparty%2Fsystemd.git validatefs: do not use EXIT_* in run() The plain DEFINE_MAIN_FUNCTION is used, i.e. all >= 0 retvals are treated as success. No need for EXIT_* annotations. --- diff --git a/src/validatefs/validatefs.c b/src/validatefs/validatefs.c index 8e7753126c7..22345e5303e 100644 --- a/src/validatefs/validatefs.c +++ b/src/validatefs/validatefs.c @@ -318,14 +318,10 @@ static int run(int argc, char *argv[]) { return r; if (r == 0) { log_info("File system '%s' has no validation constraints set, not validating.", resolved); - return EXIT_SUCCESS; + return 0; } - r = validate_fields_check(target_fd, resolved, &f); - if (r < 0) - return r; - - return EXIT_SUCCESS; + return validate_fields_check(target_fd, resolved, &f); } DEFINE_MAIN_FUNCTION(run);