mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: guestinfo: handle unsupported agent commands
When we're collecting guest information, older agents may not support all agent commands. In the case where the user requested all info types (i.e. types == 0), ignore unsupported command errors and gather as much information as possible. If the agent command failed for some other reason, or if the user explciitly requested a specific info type (i.e. types != 0), abort on the first error. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
committed by
Michal Privoznik
parent
56cac62bfd
commit
a931486a97
@@ -462,7 +462,7 @@ testQemuAgentGetFSInfoParams(const void *data)
|
||||
goto cleanup;
|
||||
|
||||
if (qemuAgentGetFSInfoParams(qemuMonitorTestGetAgent(test), ¶ms,
|
||||
&nparams, &maxparams, def) != -1) {
|
||||
&nparams, &maxparams, def) != -2) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
"agent get-fsinfo command should have failed");
|
||||
goto cleanup;
|
||||
|
||||
Reference in New Issue
Block a user