[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/13] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null
From: |
Paolo Bonzini |
Subject: |
[PULL 03/13] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure |
Date: |
Fri, 4 Jun 2021 17:17:35 +0200 |
From: Brad Smith <brad@comstyle.com>
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>
---
util/oslib-posix.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 36820fec16..7b4bec1402 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;
--
2.31.1
- [PULL 00/13] Misc bugfix patches for 2021-06-04, Paolo Bonzini, 2021/06/04
- [PULL 02/13] iscsi: link libm into the module, Paolo Bonzini, 2021/06/04
- [PULL 01/13] meson: allow optional dependencies for block modules, Paolo Bonzini, 2021/06/04
- [PULL 03/13] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure,
Paolo Bonzini <=
- [PULL 04/13] target/i386: tcg: fix segment register offsets for 16-bit TSS, Paolo Bonzini, 2021/06/04
- [PULL 05/13] target/i386: tcg: fix loading of registers from 16-bit TSS, Paolo Bonzini, 2021/06/04
- [PULL 08/13] tests/qtest/virtio-scsi-test: add unmap large LBA with 4k blocks test, Paolo Bonzini, 2021/06/04
- [PULL 07/13] target/i386: Fix decode of cr8, Paolo Bonzini, 2021/06/04
- [PULL 06/13] target/i386: tcg: fix switching from 16-bit to 32-bit tasks or vice versa, Paolo Bonzini, 2021/06/04
- [PULL 09/13] i386: reorder call to cpu_exec_realizefn, Paolo Bonzini, 2021/06/04
- [PULL 12/13] vl: plumb keyval-based options into -readconfig, Paolo Bonzini, 2021/06/04
- [PULL 10/13] i386: run accel_cpu_instance_init as post_init, Paolo Bonzini, 2021/06/04
- [PULL 11/13] qemu-config: parse configuration files to a QDict, Paolo Bonzini, 2021/06/04