diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2010-12-03 09:36:47 +0000 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2010-12-03 09:36:47 +0000 |
commit | 048f6a9497466b39eb6f34eb0a699e632c15929f (patch) | |
tree | b323954ad4f08e230ca40aca617d2d458ef93ae9 /tools/libxc/xenctrl.h | |
parent | fa0eebfd1bd2a7eea7b6cb424a8d83cebfe6ee0b (diff) | |
download | xen-048f6a9497466b39eb6f34eb0a699e632c15929f.tar.gz xen-048f6a9497466b39eb6f34eb0a699e632c15929f.tar.bz2 xen-048f6a9497466b39eb6f34eb0a699e632c15929f.zip |
libxc: add ability to query OS interface for "fakeness"
i.e. not running on a real hypervisor
Allows users of the library to adjust behaviour. I don't especially
like this violation of the abstraction but both oxenstored and xapi
use this to avoid difficult to simulate operations when running on the
simulator.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/libxc/xenctrl.h')
-rw-r--r-- | tools/libxc/xenctrl.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h index 18d778bdb1..4827303b73 100644 --- a/tools/libxc/xenctrl.h +++ b/tools/libxc/xenctrl.h @@ -159,6 +159,15 @@ enum xc_open_flags { */ int xc_interface_close(xc_interface *xch); +/** + * Query the active OS interface (i.e. that which would be returned by + * xc_interface_open) to find out if it is fake (i.e. backends onto + * something other than an actual Xen hypervisor). + * + * @return 0 is "real", >0 if fake, -1 on error. + */ +int xc_interface_is_fake(void); + /* * HYPERCALL SAFE MEMORY BUFFER * |