diff options
author | Brad Smith <brad@comstyle.com> | 2021-04-01 13:34:00 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-06-04 13:47:07 +0200 |
commit | 29c3d213f4ad69688638330728cff1a8769d7415 (patch) | |
tree | e646991de3a0f153adedb0deae1c55df3e0a9f6b | |
parent | 7fa1c63553242ad557c26dafd01e828ff1507c64 (diff) | |
download | qemu-29c3d213f4ad69688638330728cff1a8769d7415.zip qemu-29c3d213f4ad69688638330728cff1a8769d7415.tar.gz qemu-29c3d213f4ad69688638330728cff1a8769d7415.tar.bz2 |
oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure
OpenBSD prior to 6.3 required a workaround to utilize fcntl(F_SETFL) on memory
devices.
Since modern verions of OpenBSD that are only officialy supported and buildable
on do not have this issue I am garbage collecting this workaround.
Signed-off-by: Brad Smith <brad@comstyle.com>
Message-Id: <YGYECGXQhdamEJgC@humpty.home.comstyle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | util/oslib-posix.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c index 36820fe..7b4bec1 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -273,17 +273,6 @@ int qemu_try_set_nonblock(int fd) return -errno; } if (fcntl(fd, F_SETFL, f | O_NONBLOCK) == -1) { -#ifdef __OpenBSD__ - /* - * Previous to OpenBSD 6.3, fcntl(F_SETFL) is not permitted on - * memory devices and sets errno to ENODEV. - * It's OK if we fail to set O_NONBLOCK on devices like /dev/null, - * because they will never block anyway. - */ - if (errno == ENODEV) { - return 0; - } -#endif return -errno; } return 0; |