[libvirt] [PATCH 1/5] add timeout seconds to qemuAgentSend()

Eric Blake eblake at redhat.com
Wed Aug 8 14:52:04 UTC 2012


[Your series came through unthreaded, which makes it hard to follow -
double-check your 'git send-email' settings to ensure that the patches
are sent in-reply-to the cover letter.  Also, these days it is better to
use UTF-8 instead of ISO-2022-JP encoding for email.]

On 08/07/2012 06:04 PM, MATSUDA, Daiki wrote:
>     Add @seconds valuable to qemuAgentSend().

s/valuable/variable/

>     It points timeout seconds on @timeout true.
>     If @seconds is 0 on @timeout true, use default timeout value (QEMU_AGENT_WAIT_TIME).

Awkward wording, how about:

When @timeout is true, @seconds controls how long to wait for a response
(if @seconds is 0, default to QEMU_AGENT_WAIT_TIME).

>     If @timeout is false, @seconds is meanless.

s/meanless/ignored/

> @@ -1005,7 +1008,7 @@ qemuAgentCommand(qemuAgentPtr mon,
> 
>      VIR_DEBUG("Send command '%s' for write", cmdstr);
> 
> -    ret = qemuAgentSend(mon, &msg, false);
> +    ret = qemuAgentSend(mon, &msg, (timeout > 0 ? true : false), timeout);

Could be shortened to qemuAgentSend(mon, &msg, !!timeout, timeout)

Overall seems pretty reasonable.  I'll finish reviewing the series
before pushing anything, though.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120808/abf0069b/attachment-0001.sig>


More information about the libvir-list mailing list