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

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

 



[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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]