qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Hanna Reitz <hreitz@redhat.com>,
	"open list:raw" <qemu-block@nongnu.org>
Subject: Re: [PATCH 09/10] block: move fcntl_setfl()
Date: Fri, 22 Apr 2022 05:20:43 -0700	[thread overview]
Message-ID: <0f4c56d3-dfe7-bae6-925c-8b605d4e669d@linaro.org> (raw)
In-Reply-To: <20220422083639.3156978-10-marcandre.lureau@redhat.com>

On 4/22/22 01:36, marcandre.lureau@redhat.com wrote:
> +/* Sets a specific flag */
> +static int fcntl_setfl(int fd, int flag)
> +{
> +    int flags;
> +
> +    flags = fcntl(fd, F_GETFL);
> +    if (flags == -1)
> +        return -errno;
> +
> +    if (fcntl(fd, F_SETFL, flags | flag) == -1)
> +        return -errno;
> +
> +    return 0;
> +}
> +
>   static int raw_reconfigure_getfd(BlockDriverState *bs, int flags,
>                                    int *open_flags, uint64_t perm, bool force_dup,
>                                    Error **errp)
> diff --git a/util/oslib-posix.c b/util/oslib-posix.c
> index 543c9944b083..1c231087408f 100644
> --- a/util/oslib-posix.c
> +++ b/util/oslib-posix.c
> @@ -794,21 +794,6 @@ size_t qemu_get_host_physmem(void)
>       return 0;
>   }
>   
> -/* Sets a specific flag */
> -int fcntl_setfl(int fd, int flag)
> -{
> -    int flags;
> -
> -    flags = fcntl(fd, F_GETFL);
> -    if (flags == -1) {
> -        return -errno;
> -    }
> -    if (fcntl(fd, F_SETFL, flags | flag) == -1) {
> -        return -errno;
> -    }
> -    return 0;
> -}

Lost braces in the move.

r~


  reply	other threads:[~2022-04-22 13:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22  8:36 [PATCH 00/10] Misc cleanups marcandre.lureau
2022-04-22  8:36 ` [PATCH 01/10] Use QEMU_SANITIZE_THREAD marcandre.lureau
2022-04-22  8:36 ` [PATCH 02/10] Use QEMU_SANITIZE_ADDRESS marcandre.lureau
2022-04-22  8:36 ` [PATCH 03/10] include: move qemu_*_exec_dir() to cutils marcandre.lureau
2022-04-22  8:36 ` [PATCH 04/10] tests: move libqtest.h back under qtest/ marcandre.lureau
2022-04-25 19:32   ` Thomas Huth
2022-04-22  8:36 ` [PATCH 05/10] libqtest: split QMP part in libqmp marcandre.lureau
2022-04-25 19:39   ` Thomas Huth
2022-04-22  8:36 ` [PATCH 06/10] Replace qemu_pipe() with g_unix_open_pipe() marcandre.lureau
2022-04-22  8:59   ` Daniel P. Berrangé
2022-04-22  9:09     ` Marc-André Lureau
2022-04-22  8:36 ` [PATCH 07/10] tests: make libqmp buildable for win32 marcandre.lureau
2022-04-22  8:36 ` [PATCH 08/10] Use g_unix_set_fd_nonblocking() marcandre.lureau
2022-04-22  8:56   ` Daniel P. Berrangé
2022-04-22  9:06     ` Marc-André Lureau
2022-04-22 14:24   ` Eric Blake
2022-04-22 14:27     ` Marc-André Lureau
2022-04-22  8:36 ` [PATCH 09/10] block: move fcntl_setfl() marcandre.lureau
2022-04-22 12:20   ` Richard Henderson [this message]
2022-04-22  8:36 ` [PATCH 10/10] util/win32: simplify qemu_get_local_state_dir() marcandre.lureau

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=0f4c56d3-dfe7-bae6-925c-8b605d4e669d@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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).