summaryrefslogtreecommitdiffstats
path: root/src/getty-generator
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
commitfc53809803cd2bc2434e312b19a18fa36776da12 (patch)
treeb4b43bd6538f51965ce32856e9c053d0f90919c8 /src/getty-generator
parentAdding upstream version 255.5. (diff)
downloadsystemd-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.c7
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;