diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libxc/xc_netbsd.c | 3 | ||||
-rw-r--r-- | tools/libxc/xc_private.c | 16 | ||||
-rw-r--r-- | tools/libxc/xc_solaris.c | 3 |
3 files changed, 16 insertions, 6 deletions
diff --git a/tools/libxc/xc_netbsd.c b/tools/libxc/xc_netbsd.c index 72e1c28517..0f49e30ad1 100644 --- a/tools/libxc/xc_netbsd.c +++ b/tools/libxc/xc_netbsd.c @@ -386,9 +386,6 @@ static struct xc_osdep_ops *netbsd_osdep_init(xc_interface *xch, enum xc_osdep_t return &netbsd_privcmd_ops; case XC_OSDEP_EVTCHN: return &netbsd_evtchn_ops; - case XC_OSDEP_GNTTAB: - ERROR("GNTTAB interface not supported on this platform"); - return NULL; default: return NULL; } diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c index 09a91e75ad..3ceed3e660 100644 --- a/tools/libxc/xc_private.c +++ b/tools/libxc/xc_private.c @@ -111,6 +111,18 @@ static void xc_osdep_put(xc_osdep_info_t *info) #endif } +static const char *xc_osdep_type_name(enum xc_osdep_type type) +{ + switch ( type ) + { + case XC_OSDEP_PRIVCMD: return "privcmd"; + case XC_OSDEP_EVTCHN: return "evtchn"; + case XC_OSDEP_GNTTAB: return "gnttab"; + case XC_OSDEP_GNTSHR: return "gntshr"; + } + return "unknown"; +} + static struct xc_interface_core *xc_interface_open_common(xentoollog_logger *logger, xentoollog_logger *dombuild_logger, unsigned open_flags, @@ -161,7 +173,11 @@ static struct xc_interface_core *xc_interface_open_common(xentoollog_logger *log xch->ops = xch->osdep.init(xch, type); if ( xch->ops == NULL ) + { + ERROR("OSDEP: interface %d (%s) not supported on this platform", + type, xc_osdep_type_name(type)); goto err_put_iface; + } xch->ops_handle = xch->ops->open(xch); if (xch->ops_handle == XC_OSDEP_OPEN_ERROR) diff --git a/tools/libxc/xc_solaris.c b/tools/libxc/xc_solaris.c index 9de8505bb6..eba4358c9d 100644 --- a/tools/libxc/xc_solaris.c +++ b/tools/libxc/xc_solaris.c @@ -322,9 +322,6 @@ static struct xc_osdep_ops *solaris_osdep_init(xc_interface *xch, enum xc_osdep_ return &solaris_privcmd_ops; case XC_OSDEP_EVTCHN: return &solaris_evtchn_ops; - case XC_OSDEP_GNTTAB: - ERROR("GNTTAB interface not supported on this platform"); - return NULL; default: return NULL; } |