* [PATCH] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure
@ 2021-04-01 17:34 Brad Smith
2021-05-02 4:08 ` Brad Smith
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Brad Smith @ 2021-04-01 17:34 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini
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>
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;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure
2021-04-01 17:34 [PATCH] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure Brad Smith
@ 2021-05-02 4:08 ` Brad Smith
2021-05-30 19:44 ` Brad Smith
2021-05-31 16:56 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Brad Smith @ 2021-05-02 4:08 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini
ping.
On 4/1/2021 1:34 PM, Brad Smith wrote:
> 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>
>
> 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;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure
2021-04-01 17:34 [PATCH] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure Brad Smith
2021-05-02 4:08 ` Brad Smith
@ 2021-05-30 19:44 ` Brad Smith
2021-05-31 16:56 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Brad Smith @ 2021-05-30 19:44 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini
ping.
On 4/1/2021 1:34 PM, Brad Smith wrote:
> 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>
>
> 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;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure
2021-04-01 17:34 [PATCH] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure Brad Smith
2021-05-02 4:08 ` Brad Smith
2021-05-30 19:44 ` Brad Smith
@ 2021-05-31 16:56 ` Paolo Bonzini
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2021-05-31 16:56 UTC (permalink / raw)
To: Brad Smith, qemu-devel
On 01/04/21 19:34, Brad Smith wrote:
> 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>
>
> 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;
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-31 16:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 17:34 [PATCH] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure Brad Smith
2021-05-02 4:08 ` Brad Smith
2021-05-30 19:44 ` Brad Smith
2021-05-31 16:56 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).