diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
commit | fc53809803cd2bc2434e312b19a18fa36776da12 (patch) | |
tree | b4b43bd6538f51965ce32856e9c053d0f90919c8 /src/getty-generator | |
parent | Adding upstream version 255.5. (diff) | |
download | systemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip |
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/getty-generator')
-rw-r--r-- | src/getty-generator/getty-generator.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c index 7486118..acce71b 100644 --- a/src/getty-generator/getty-generator.c +++ b/src/getty-generator/getty-generator.c @@ -94,9 +94,8 @@ static int verify_tty(const char *name) { if (fd < 0) return -errno; - errno = 0; - if (isatty(fd) <= 0) - return errno_or_else(EIO); + if (!isatty_safe(fd)) + return -errno; return 0; } @@ -151,7 +150,7 @@ static int add_credential_gettys(void) { }; int r; - FOREACH_ARRAY(t, table, ELEMENTSOF(table)) { + FOREACH_ELEMENT(t, table) { _cleanup_free_ char *b = NULL; size_t sz = 0; |