[libvirt] [PATCH 0/2]: Two small fixes

Two small issues I found while testing libvirt under QMP, there is also a third I won't fix today: dommemstat doesn't work under QMP.

- Two missing 's' - 'dominfo' is duplicated Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- tools/virsh.pod | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 1b5c1d6..46ba813 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -49,7 +49,7 @@ communications channels used to talk to the hypervisor. Running as non root will return an error. Most B<virsh> commands act synchronously, except maybe shutdown, -setvcpus and setmem. In those case the fact that the B<virsh> +setvcpus and setmem. In those cases the fact that the B<virsh> program returned, may not mean the action is complete and you must poll periodically to detect that the guest completed the operation. @@ -280,7 +280,7 @@ but not started. =item B<destroy> I<domain-id> Immediately terminate the domain domain-id. This doesn't give the domain -OS any chance to react, and it the equivalent of ripping the power +OS any chance to react, and it's the equivalent of ripping the power cord out on a physical machine. In most cases you will want to use the B<shutdown> command instead. @@ -308,10 +308,6 @@ Convert a domain name or id to domain UUID Convert a domain name (or UUID) to a domain id -=item B<dominfo> I<domain-id> - -Returns basic information about the domain. - =item B<domjobabort> I<domain-id-or-uuid> Abort the currently running domain job. -- 1.7.0.4.297.g6555b1

On Fri, Apr 09, 2010 at 04:31:42PM -0300, Luiz Capitulino wrote:
- Two missing 's' - 'dominfo' is duplicated
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- tools/virsh.pod | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-)
Ah, right, thanks ! pushed :-) Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

It's not needed and is just discarded by the Server. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- src/qemu/qemu_monitor_json.c | 34 ---------------------------------- 1 files changed, 0 insertions(+), 34 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 2904201..50de240 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -356,37 +356,6 @@ qemuMonitorJSONHasError(virJSONValuePtr reply, return STREQ(klass, thisklass); } -static int -qemuMonitorJSONCommandAddTimestamp(virJSONValuePtr obj) -{ - struct timeval tv; - virJSONValuePtr timestamp = NULL; - - if (gettimeofday(&tv, NULL) < 0) { - virReportSystemError(errno, "%s", - _("cannot query time of day")); - return -1; - } - - if (!(timestamp = virJSONValueNewObject())) - goto no_memory; - - if (virJSONValueObjectAppendNumberLong(timestamp, "seconds", tv.tv_sec) < 0) - goto no_memory; - if (virJSONValueObjectAppendNumberLong(timestamp, "microseconds", tv.tv_usec) < 0) - goto no_memory; - - if (virJSONValueObjectAppend(obj, "timestamp", timestamp) < 0) - goto no_memory; - - return 0; - -no_memory: - virReportOOMError(); - virJSONValueFree(timestamp); - return -1; -} - static virJSONValuePtr ATTRIBUTE_SENTINEL qemuMonitorJSONMakeCommand(const char *cmdname, ...) @@ -404,9 +373,6 @@ qemuMonitorJSONMakeCommand(const char *cmdname, if (virJSONValueObjectAppendString(obj, "execute", cmdname) < 0) goto no_memory; - if (qemuMonitorJSONCommandAddTimestamp(obj) < 0) - goto error; - while ((key = va_arg(args, char *)) != NULL) { int ret; char type; -- 1.7.0.4.297.g6555b1

On Fri, Apr 09, 2010 at 04:31:43PM -0300, Luiz Capitulino wrote:
It's not needed and is just discarded by the Server.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- src/qemu/qemu_monitor_json.c | 34 ---------------------------------- 1 files changed, 0 insertions(+), 34 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 2904201..50de240 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -356,37 +356,6 @@ qemuMonitorJSONHasError(virJSONValuePtr reply, return STREQ(klass, thisklass); }
-static int -qemuMonitorJSONCommandAddTimestamp(virJSONValuePtr obj) -{ - struct timeval tv; - virJSONValuePtr timestamp = NULL; - - if (gettimeofday(&tv, NULL) < 0) { - virReportSystemError(errno, "%s", - _("cannot query time of day")); - return -1; - } - - if (!(timestamp = virJSONValueNewObject())) - goto no_memory; - - if (virJSONValueObjectAppendNumberLong(timestamp, "seconds", tv.tv_sec) < 0) - goto no_memory; - if (virJSONValueObjectAppendNumberLong(timestamp, "microseconds", tv.tv_usec) < 0) - goto no_memory; - - if (virJSONValueObjectAppend(obj, "timestamp", timestamp) < 0) - goto no_memory; - - return 0; - -no_memory: - virReportOOMError(); - virJSONValueFree(timestamp); - return -1; -} - static virJSONValuePtr ATTRIBUTE_SENTINEL qemuMonitorJSONMakeCommand(const char *cmdname, ...) @@ -404,9 +373,6 @@ qemuMonitorJSONMakeCommand(const char *cmdname, if (virJSONValueObjectAppendString(obj, "execute", cmdname) < 0) goto no_memory;
- if (qemuMonitorJSONCommandAddTimestamp(obj) < 0) - goto error; - while ((key = va_arg(args, char *)) != NULL) { int ret; char type;
If it's really useless, okay, but I would prefer to push this after the 0.8.0 release, just for extra safety :-) Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On Mon, 12 Apr 2010 14:25:25 +0200 Daniel Veillard <veillard@redhat.com> wrote:
On Fri, Apr 09, 2010 at 04:31:43PM -0300, Luiz Capitulino wrote:
It's not needed and is just discarded by the Server.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- src/qemu/qemu_monitor_json.c | 34 ---------------------------------- 1 files changed, 0 insertions(+), 34 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 2904201..50de240 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -356,37 +356,6 @@ qemuMonitorJSONHasError(virJSONValuePtr reply, return STREQ(klass, thisklass); }
-static int -qemuMonitorJSONCommandAddTimestamp(virJSONValuePtr obj) -{ - struct timeval tv; - virJSONValuePtr timestamp = NULL; - - if (gettimeofday(&tv, NULL) < 0) { - virReportSystemError(errno, "%s", - _("cannot query time of day")); - return -1; - } - - if (!(timestamp = virJSONValueNewObject())) - goto no_memory; - - if (virJSONValueObjectAppendNumberLong(timestamp, "seconds", tv.tv_sec) < 0) - goto no_memory; - if (virJSONValueObjectAppendNumberLong(timestamp, "microseconds", tv.tv_usec) < 0) - goto no_memory; - - if (virJSONValueObjectAppend(obj, "timestamp", timestamp) < 0) - goto no_memory; - - return 0; - -no_memory: - virReportOOMError(); - virJSONValueFree(timestamp); - return -1; -} - static virJSONValuePtr ATTRIBUTE_SENTINEL qemuMonitorJSONMakeCommand(const char *cmdname, ...) @@ -404,9 +373,6 @@ qemuMonitorJSONMakeCommand(const char *cmdname, if (virJSONValueObjectAppendString(obj, "execute", cmdname) < 0) goto no_memory;
- if (qemuMonitorJSONCommandAddTimestamp(obj) < 0) - goto error; - while ((key = va_arg(args, char *)) != NULL) { int ret; char type;
If it's really useless, okay, but I would prefer to push this after the 0.8.0 release, just for extra safety :-)
That's fine.
participants (2)
-
Daniel Veillard
-
Luiz Capitulino