sync_guest_time: use the proper errno

In qemuDomainSetTime, VIR_ERR_OPERATION_UNSUPPORTED
is used to report qemu doesn't support it.

[1]: 228ae70938/src/qemu/qemu_driver.c (L19437)

Change-Id: I84ddb9c434625fd4a57a4f54d0856044e1c56f3f
Signed-off-by: Chen Hanxiao <chenhx@certusnet.com.cn>
(cherry picked from commit a991471f3e)
This commit is contained in:
Chen Hanxiao 2018-06-06 03:24:58 +08:00 committed by Lee Yarwood
parent 2592ee950e
commit e2caea6cae
2 changed files with 2 additions and 1 deletions

View File

@ -128,6 +128,7 @@ VIR_ERR_NO_NODE_DEVICE = 667
VIR_ERR_NO_SECRET = 66
VIR_ERR_AGENT_UNRESPONSIVE = 86
VIR_ERR_ARGUMENT_UNSUPPORTED = 74
VIR_ERR_OPERATION_UNSUPPORTED = 84
# Readonly
VIR_CONNECT_RO = 1

View File

@ -168,7 +168,7 @@ class Guest(object):
if code == libvirt.VIR_ERR_AGENT_UNRESPONSIVE:
LOG.debug('Failed to set time: QEMU agent unresponsive',
instance_uuid=self.uuid)
elif code == libvirt.VIR_ERR_NO_SUPPORT:
elif code == libvirt.VIR_ERR_OPERATION_UNSUPPORTED:
LOG.debug('Failed to set time: not supported',
instance_uuid=self.uuid)
elif code == libvirt.VIR_ERR_ARGUMENT_UNSUPPORTED: