qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] raw-win32: Fix write request error handling
@ 2015-09-24  9:14 Kevin Wolf
  2015-09-24 12:55 ` Eric Blake
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Wolf @ 2015-09-24  9:14 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, qemu-devel, guangmuzhu

aio_worker() wrote the return code to the wrong variable.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Tested-by: Guangmu Zhu <guangmuzhu@gmail.com>
---
 block/raw-win32.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/raw-win32.c b/block/raw-win32.c
index 68f2338..b562c94 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -119,9 +119,9 @@ static int aio_worker(void *arg)
     case QEMU_AIO_WRITE:
         count = handle_aiocb_rw(aiocb);
         if (count == aiocb->aio_nbytes) {
-            count = 0;
+            ret = 0;
         } else {
-            count = -EINVAL;
+            ret = -EINVAL;
         }
         break;
     case QEMU_AIO_FLUSH:
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] raw-win32: Fix write request error handling
  2015-09-24  9:14 [Qemu-devel] [PATCH] raw-win32: Fix write request error handling Kevin Wolf
@ 2015-09-24 12:55 ` Eric Blake
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Blake @ 2015-09-24 12:55 UTC (permalink / raw)
  To: Kevin Wolf, qemu-block; +Cc: qemu-devel, guangmuzhu

[-- Attachment #1: Type: text/plain, Size: 978 bytes --]

On 09/24/2015 03:14 AM, Kevin Wolf wrote:
> aio_worker() wrote the return code to the wrong variable.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> Tested-by: Guangmu Zhu <guangmuzhu@gmail.com>
> ---
>  block/raw-win32.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/block/raw-win32.c b/block/raw-win32.c
> index 68f2338..b562c94 100644
> --- a/block/raw-win32.c
> +++ b/block/raw-win32.c
> @@ -119,9 +119,9 @@ static int aio_worker(void *arg)
>      case QEMU_AIO_WRITE:
>          count = handle_aiocb_rw(aiocb);
>          if (count == aiocb->aio_nbytes) {
> -            count = 0;
> +            ret = 0;
>          } else {
> -            count = -EINVAL;
> +            ret = -EINVAL;
>          }
>          break;
>      case QEMU_AIO_FLUSH:
> 

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-24 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-24  9:14 [Qemu-devel] [PATCH] raw-win32: Fix write request error handling Kevin Wolf
2015-09-24 12:55 ` Eric Blake

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).