On Mon, Aug 07, 2006 at 11:41:48PM +0100, Daniel P. Berrange wrote:
On Mon, Aug 07, 2006 at 10:40:11PM +0100, Daniel P. Berrange wrote:
> > > This is the same problem we so far prevented me adding the path to the
> > > serial console Psuedo-TTY to the XML for a domain. I'd rather like to
have
> > > this in 0.1.4 release of libvirt too, so any suggestions on how to
approach
> > > implementation when some of the data for the XML needs to come from XS ?
> >
> > I would make a wrapper function for the 2 special xs_read calls, to only
> > export relatively high level interface from xs_internal.h for example
> >
> > int xenStoreDomainVncPort(virDomainPtr domain);
> >
> > returning -1 in case of error. Similar for the TTY.
> >
> > Make sense ?
>
> Yeah sounds resonable to me. I'll take a crack at implementing these two
> additions to the XML doc and post a patch for review when I have something
> reasonable working.
See attached patch which looks up port number in xenstore & also pulls
out the serial console tty.
looks perfect, I would just nitpick about the use of atoi which doesn't catch
errors (strtol is better I guess). And also the fact that the patch to
format.html should really be applied to libvir.html because all htmls are
generated from it via the stylesheets (make rebuild in doc directory).
thanks !
Daniel
--
Daniel Veillard | Red Hat
http://redhat.com/
veillard(a)redhat.com | libxml GNOME XML XSLT toolkit
http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine
http://rpmfind.net/