The basic change here is that the virDrvOpen call (the internal "open"
call for drivers) now takes the parsed xmlURIPtr instead of the raw name
string.
typedef virDrvOpenStatus
(*virDrvOpen) (virConnectPtr conn,
- const char *name,
+ xmlURIPtr uri,
int flags);
So we avoid the redundant URI parsing which was going on inside all the
drivers, and also the ad-hoc "does-it-look-like-a-URI" string comparisons.
That's straightforward enough except that all of the drivers were saving
the name string in their private data so that they could implement the
virConnectGetURI call. I've changed this so that the name is copied and
saved in the main virConnect structure, and virConnectGetURI will return
that unless the driver wants to override it.
You need another patch (coming shortly) to allow URIs like
xen://localhost (without the trailing slash) to work, which was IIRC the
original point of this discussion.
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