qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Brad Smith <brad@comstyle.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure
Date: Sun, 30 May 2021 15:44:59 -0400	[thread overview]
Message-ID: <74fd36f2-6638-6f43-f1d1-63cd41670e62@comstyle.com> (raw)
In-Reply-To: <YGYECGXQhdamEJgC@humpty.home.comstyle.com>

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;


  parent reply	other threads:[~2021-05-30 19:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-05-31 16:56 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74fd36f2-6638-6f43-f1d1-63cd41670e62@comstyle.com \
    --to=brad@comstyle.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).