qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/5] qemu-io: Drop command functions' return val


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 1/5] qemu-io: Drop command functions' return values
Date: Mon, 30 Apr 2018 09:58:07 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 04/28/2018 09:41 AM, Max Reitz wrote:
For qemu-io, a function returns an integer with two possible values: 0
for "qemu-io may continue execution", or 1 for "qemu-io should exit".
However, there is only a single command that returns 1, and that is
"quit".

So let's turn this case into a global variable instead so we can make
better use of the return value in a later patch.

Signed-off-by: Max Reitz <address@hidden>
---
  include/qemu-io.h |   6 +-
  qemu-io-cmds.c    | 294 +++++++++++++++++++++++++-----------------------------
  qemu-io.c         |  36 +++----
  3 files changed, 157 insertions(+), 179 deletions(-)


Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

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