qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v3] aio-posix: remove useless parameter


From: Eric Blake
Subject: Re: [Qemu-block] [PATCH v3] aio-posix: remove useless parameter
Date: Thu, 14 Jul 2016 08:10:25 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 07/14/2016 06:57 AM, Cao jin wrote:
> Parameter **errp of aio_context_setup() is useless, remove it
> and clean up the related code.
> 
> Cc: Stefan Hajnoczi <address@hidden>
> Cc: Fam Zheng <address@hidden>
> Cc: Eric Blake <address@hidden>
> Signed-off-by: Cao jin <address@hidden>
> ---
>  aio-posix.c         | 3 ++-
>  aio-win32.c         | 2 +-
>  async.c             | 8 ++------
>  include/block/aio.h | 2 +-
>  4 files changed, 6 insertions(+), 9 deletions(-)
> 
> v3 changelog:
> 1. printf errno, and fix build failure on Windows (Stefan)
> 
> 
> diff --git a/aio-posix.c b/aio-posix.c
> index 6006122..0bb4144 100644
> --- a/aio-posix.c
> +++ b/aio-posix.c
> @@ -485,12 +485,13 @@ bool aio_poll(AioContext *ctx, bool blocking)
>      return progress;
>  }
>  
> -void aio_context_setup(AioContext *ctx, Error **errp)
> +void aio_context_setup(AioContext *ctx)
>  {
>  #ifdef CONFIG_EPOLL_CREATE1
>      assert(!ctx->epollfd);
>      ctx->epollfd = epoll_create1(EPOLL_CLOEXEC);
>      if (ctx->epollfd == -1) {
> +        fprintf(stderr, "Failed to create epoll instance: %d", errno);

Better is to use %s and strerror(errno), as a raw int isn't very meaningful.


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]