WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] xl: Check for dependencies in xl

On Fri, 2011-01-14 at 18:57 +0000, Kamala Narasimhan wrote:
> 
> > The next thing after this xtl_createlogger_stdiostream(...) is a
> call to
> > libxl_ctx_init which will try and open the xenstore in the same way
> and
> > has error logging already so perhaps we should improve on that
> instead
> > of adding a separate check?
> >
> >
> 
> Aren't we making the following assumptions in doing so -
> 
> 1)  xtl_createlogger_stdiostream would always be the first function
> called that uses xenstore.

You mean "libxl_ctx_init would always be..."?

In that case yes since that it is the function contains opens the
connection to xenstore so it must be called first. A libxl user
shouldn't need to see or use xenstore directly itself since libxl
encapsulates this.

xtl_createlogger_stdiostream does/can not use xenstore since it comes
from libxc which is beneath (or perhaps alongside) libxenstore in the
software stack.

> 2)  There aren't likely to be other dependency checks to be added in
> future that might warrant a separate function to perform such checks? 

It's not clear what other checks there will end up being but those which
are due to libxl's dependencies (e.g. xenstore) should be in a libxl
function. This could be a separate libxl_check_dependencies() but I
can't see any reason not to do it in libxl_ctx_init().

If xl has some dependency of its own independent of libxl which it is
useful to check then it would be appropriate to add those checks to xl
itself.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel