Roman Divacky wrote:
hi
I am messing with libvirt and I need to add some methods to the
xenUnifiedDriver structure. I do it this way:
(currently #ifdef-ed out)
struct xenUnifiedDriver {
virDrvOpen open;
virDrvClose close;
virDrvGetVersion version;
virDrvGetHostname getHostname;
virDrvGetURI getURI;
virDrvNodeGetInfo nodeGetInfo;
virDrvGetCapabilities getCapabilities;
virDrvListDomains listDomains;
#if 0
virDrvListDatastores listDatastores;
virDrvListSyspreps listSyspreps;
#endif
....
with the #if switched to off I am seeing some problems in
xenUnifiedDomainGetInfo(). it basically iterates through
array of driver structures to find out suitable domainGetInfo()
method. When I flip the #if to 1 the driver structures get redefined
causing xenUnifiedDomainGetInfo() to not find any suitable driver.
Don't add things to xenUnifiedDriver structure -- this structure should
go away eventually. (See the comment in src/xen_unified.h).
Instead, just do whatever you need directly from src/xen_unified.c, be
that direct code or calling something lower level.
code stuffed with debugging printfs:
#if 0 case:
priv->opened[i]: 0
drivers[i]->domainGetInfo: 0x2aaaaaae0c10
priv->opened[i]: 1
drivers[i]->domainGetInfo: 0x2aaaaaaec2c0
Domains 0: 2 CPUs
#if 1 case:
priv->opened[i]: 0
drivers[i]->domainGetInfo: (nil)
priv->opened[i]: 1
drivers[i]->domainGetInfo: (nil)
priv->opened[i]: 0
drivers[i]->domainGetInfo: 0x2aaaaaae7400
priv->opened[i]: 0
drivers[i]->domainGetInfo: (nil)
priv->opened[i]: 1
drivers[i]->domainGetInfo: (nil)
Failed to get informations for Domain 0
as you can see the "drivers" (xenHypervisorDriver etc.) got
redefined...
any idea why? or whats going on?
thnx for any possible help, if you cannot help me could you please
forward this mail to the appropriete place?
You should send any questions to libvirt-list:
http://www.redhat.com/mailman/listinfo/libvir-list
Rich.
--
Emerging Technologies, Red Hat -
http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903