[libvirt] [PATCH] fix virsh dominfo returns error when virNodeGetSecurityModel() is not supported.
Tatsuro Enokura
fj2026af at aa.jp.fujitsu.com
Thu Jun 18 09:08:36 UTC 2009
Hi all
I try virsh dominfo in upstream libvirt on xen machine,
the commands returns -1 as follows:
[root at vmi20 ~]# virsh dominfo rhel53rc2_pv_sdb3
Id: 1
Name: rhel53rc2_pv_sdb3
UUID: 05ba9be8-f4e9-e208-11c7-fc936655cd8e
OS Type: linux
State: idle
CPU(s): 2
CPU time: 8.8s
Max memory: 1048576 kB
Used memory: 716800 kB
Autostart: disable
error: this function is not supported by the hypervisor:
virNodeGetSecurityModel
[root at vmi20 ~]# echo $?
1
The explanation of virNodeGetSecurityModel() and
virNodeGetSecurityModel() in libvirt.c is return -2
when hypervisor drivers don't support these operations.
But these functions return -1 in this case, and so
cmdDominfo() in virsh.c returns FALSE.
I make a patch.
- virNodeGetSecurityModel() and virNodeGetSecurityModel()
return -2 when drivers don't supprted these operations.
- In CmdDominfo(), it is no operation when virNodeGetSecurityModel()
and virNodeGetSecurityModel() return -2.
Signed-off-by: Tatsuro Enokura <fj2026af at aa.jp.fujitsu.com>
Thanks
Tatsuro Enokura
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dominfo.patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090618/ec538054/attachment-0001.ksh>
More information about the libvir-list
mailing list