]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: use DEFINE_MAIN_FUNCTION in cdrom_id
authorDan Streetman <ddstreet@canonical.com>
Sun, 17 Jan 2021 22:46:12 +0000 (17:46 -0500)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 20 Jan 2021 08:31:47 +0000 (08:31 +0000)
This was failing s390x ubuntu ci due to an old version of binutils;
the binutils package in use for ubuntu ci tests has been updated and
the build no longer fails, so this can use the macro again.

Fixes: #18165
src/udev/cdrom_id/cdrom_id.c

index a97ed8eabdd041ecac7eb04d0589bac56b78bd76..f6f45f4e2a8d7ec052cdc76b28186d8fa71eb126 100644 (file)
@@ -11,6 +11,7 @@
 #include <unistd.h>
 
 #include "fd-util.h"
+#include "main-func.h"
 #include "memory-util.h"
 #include "random-util.h"
 #include "sort-util.h"
@@ -1005,17 +1006,4 @@ work:
         return 0;
 }
 
-int main(int argc, char *argv[]) {
-        int r;
-
-        log_set_target(LOG_TARGET_AUTO);
-        udev_parse_config();
-        log_parse_environment();
-        log_open();
-
-        r = run(argc, argv);
-
-        log_close();
-
-        return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
-}
+DEFINE_MAIN_FUNCTION(run);