
On Thu, Nov 27, 2008 at 04:26:50PM +0000, Daniel P. Berrange wrote:
On Wed, Nov 26, 2008 at 10:08:03PM +0000, Daniel P. Berrange wrote:
When connecting to a local libvirt you can let it automatically probe the hypervisor URI if you don't know it ahead of time. This doesn't work with remote URIs because you need to have something to put in the URI scheme before the hostname [...] I'm thinking that perhaps we can just change the virGetVersion() apis so that instead of looking in virDriverPtr struct, we just include the version numbers directly in virGetVersion as a static const lookup table. Meanwhile, this patch also includes a change to virsh to stop it calling virGetVersion(), though this hunk instead intended to apply to CVS.
The attached patch does just this now - we remove the version field from the virDriverPtr, and just hardwire info for all compiled drivers into the virGetVersion impl directly, avoiding need to access the drivers which may not be present.
Okay, I initially though the driver versions would be more dynamic but since we usually just use the libvirt version macro, well the patch just reflects the status-quo, fine, +1 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/