]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/getty-generator/getty-generator.c
tree-wide: use -EBADF for fd initialization
[thirdparty/systemd.git] / src / getty-generator / getty-generator.c
index 59bdfc496b6b45e1a5cb0b0572d9dee908b67c27..d255e90db52ec722484f8725355d87992d7b8efc 100644 (file)
@@ -18,7 +18,6 @@
 #include "strv.h"
 #include "terminal-util.h"
 #include "unit-name.h"
-#include "util.h"
 #include "virt.h"
 
 static const char *arg_dest = NULL;
@@ -79,7 +78,7 @@ static int add_container_getty(const char *tty) {
 }
 
 static int verify_tty(const char *name) {
-        _cleanup_close_ int fd = -1;
+        _cleanup_close_ int fd = -EBADF;
         const char *p;
 
         /* Some TTYs are weird and have been enumerated but don't work
@@ -215,9 +214,7 @@ static int run(const char *dest, const char *dest_early, const char *dest_late)
                         return r;
         }
 
-        /* Automatically add in a serial getty on the first
-         * virtualizer console */
-        const char *j;
+        /* Automatically add in a serial getty on the first virtualizer console */
         FOREACH_STRING(j,
                        "hvc0",
                        "xvc0",