[libvirt] [PATCH 2/2] Fix QEMU text monitor command error checking
Eric Blake
eblake at redhat.com
Thu Apr 22 15:57:52 UTC 2010
On 04/22/2010 09:49 AM, Daniel P. Berrange wrote:
> The text monitor code was checking for a '\n' prefix on several
> places. Previously this would work, but since the monitor code
> re-write the '\n' is already stripped off, so mustn't be checked
> for.
>
> * src/qemu/qemu_monitor_text.c: Fix monitor error checking
> ---
> src/qemu/qemu_monitor_text.c | 14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
> index db3806d..4c8c108 100644
> --- a/src/qemu/qemu_monitor_text.c
> +++ b/src/qemu/qemu_monitor_text.c
> @@ -787,7 +787,7 @@ int qemuMonitorTextSetBalloon(qemuMonitorPtr mon,
>
> /* If the command failed qemu prints: 'unknown command'
> * No message is printed on success it seems */
> - if (strstr(reply, "\nunknown command:")) {
> + if (strstr(reply, "unknown command:")) {
> /* Don't set error - it is expected memory balloon fails on many qemu */
> ret = 0;
> } else {
> @@ -816,7 +816,7 @@ int qemuMonitorTextSetCPU(qemuMonitorPtr mon, int cpu, int online)
>
> if (qemuMonitorCommand(mon, cmd, &reply) < 0) {
> qemuReportError(VIR_ERR_OPERATION_FAILED,
> - "%s", _("could nt change CPU online status"));
> + "%s", _("could not change CPU online status"));
ACK. Nice way to sneak in the typo fix in the process.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100422/f16aca10/attachment-0001.sig>
More information about the libvir-list
mailing list