From: Lennart Poettering Date: Wed, 24 Jan 2018 10:09:29 +0000 (+0100) Subject: coccinelle: O_NDELAY → O_NONBLOCK X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=348a0b6596fdeb91e5cc69e09d5e2feb74455f04;p=elogind.git coccinelle: O_NDELAY → O_NONBLOCK Apparently O_NONBLOCK is the modern name used in most documentation and for most cases in our sources. Let's hence replace the old alias O_NDELAY and stick to O_NONBLOCK everywhere. --- diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c index 8a6487ea4..e14835292 100644 --- a/src/login/logind-inhibit.c +++ b/src/login/logind-inhibit.c @@ -305,7 +305,7 @@ int inhibitor_create_fifo(Inhibitor *i) { /* Open reading side */ if (i->fifo_fd < 0) { - i->fifo_fd = open(i->fifo_path, O_RDONLY|O_CLOEXEC|O_NDELAY); + i->fifo_fd = open(i->fifo_path, O_RDONLY|O_CLOEXEC|O_NONBLOCK); if (i->fifo_fd < 0) return -errno; } @@ -321,7 +321,7 @@ int inhibitor_create_fifo(Inhibitor *i) { } /* Open writing side */ - r = open(i->fifo_path, O_WRONLY|O_CLOEXEC|O_NDELAY); + r = open(i->fifo_path, O_WRONLY|O_CLOEXEC|O_NONBLOCK); if (r < 0) return -errno; diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 7addb3070..6a3b71ccc 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -1020,7 +1020,7 @@ int session_create_fifo(Session *s) { /* Open reading side */ if (s->fifo_fd < 0) { - s->fifo_fd = open(s->fifo_path, O_RDONLY|O_CLOEXEC|O_NDELAY); + s->fifo_fd = open(s->fifo_path, O_RDONLY|O_CLOEXEC|O_NONBLOCK); if (s->fifo_fd < 0) return -errno; @@ -1039,7 +1039,7 @@ int session_create_fifo(Session *s) { } /* Open writing side */ - r = open(s->fifo_path, O_WRONLY|O_CLOEXEC|O_NDELAY); + r = open(s->fifo_path, O_WRONLY|O_CLOEXEC|O_NONBLOCK); if (r < 0) return -errno; diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c index 1715c0fb2..cab1cd6a2 100644 --- a/src/shared/utmp-wtmp.c +++ b/src/shared/utmp-wtmp.c @@ -330,7 +330,7 @@ static int write_to_terminal(const char *tty, const char *message) { assert(tty); assert(message); - fd = open(tty, O_WRONLY|O_NDELAY|O_NOCTTY|O_CLOEXEC); + fd = open(tty, O_WRONLY|O_NONBLOCK|O_NOCTTY|O_CLOEXEC); if (fd < 0 || !isatty(fd)) return -errno;