[Libvir] remote access ?

Daniel P. Berrange berrange at redhat.com
Mon Oct 15 19:33:08 UTC 2007


On Mon, Oct 15, 2007 at 04:37:22PM +0100, Richard W.M. Jones wrote:
> Daniel P. Berrange wrote:
> >It is a bug in xend_internal.c
> >
> >    if (strcasecmp (name, "xen") == 0 ||
> >        strncasecmp (name, "xen:///", 7) == 0) {
> >
> >
> >This needs to die & be replaced with code calling the libxml URI parsing.
> >I fixed a similar bug in the QEMU driver a few weeks back.
> 
> Sorry yes, Dan is right, so ignore the hack/patch I just posted.
> 
> In fact xen_unified.c already parses the URI once, so we just need to 
> change the xen_unified <-> xen low level drivers API to pass the parsed 
> URI instead of the name string.

In fact we could take it one bit further. Have the 'do_open' method in
the src/libvirt.c file parse it & change the src/driver.h so that the
open method for drivers takes  xmlURIPtr instead of a char *. That way
we guarentee that all drivers will use a correctly parsed form.


Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the libvir-list mailing list