]> xenbits.xensource.com Git - libvirt.git/commit
libxl: Earlier detection of not running on Xen
authorJim Fehlig <jfehlig@suse.com>
Fri, 30 Aug 2013 18:34:48 +0000 (12:34 -0600)
committerJim Fehlig <jfehlig@suse.com>
Tue, 3 Sep 2013 22:43:20 +0000 (16:43 -0600)
commit2f8d0f902174230be23dc9bc34a802f03245b16e
tree27424578693f2e5b7e38234383a1b0f7a27e6042
parent12315cd7790ccb6f61bfee246d42f17cb8fa4f08
libxl: Earlier detection of not running on Xen

Detect early on in libxl driver initialization if the driver
should be loaded at all, avoiding needless initialization steps
that only have to be undone later.  While at it, move the
detection to a helper function to improve readability.

After detecting that the driver should be loaded, subsequent
failures such as initializing the log stream, allocating libxl
ctx, etc. should be treated as failure to initialize the driver.
src/libxl/libxl_driver.c