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-changelog

[Xen-changelog] [xen-unstable] libxc: osdep: report missing backends in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: osdep: report missing backends in common code
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Mon, 17 Oct 2011 20:44:14 +0100
Delivery-date: Mon, 17 Oct 2011 12:45:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1318498329 -3600
# Node ID 8a817e804d6857ac96cdb71893953ce8e18ca84a
# Parent  4e33ab60179aa0b6e447f44e7aa6c397e1de808b
libxc: osdep: report missing backends in common code

Backends were inconsistent about reporting and it's a pain to edit them all
when adding a new class of osdep.

Signed-off-by: Ian Campbell <Ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
---


diff -r 4e33ab60179a -r 8a817e804d68 tools/libxc/xc_netbsd.c
--- a/tools/libxc/xc_netbsd.c   Thu Oct 13 10:32:09 2011 +0100
+++ b/tools/libxc/xc_netbsd.c   Thu Oct 13 10:32:09 2011 +0100
@@ -386,9 +386,6 @@
         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 -r 4e33ab60179a -r 8a817e804d68 tools/libxc/xc_private.c
--- a/tools/libxc/xc_private.c  Thu Oct 13 10:32:09 2011 +0100
+++ b/tools/libxc/xc_private.c  Thu Oct 13 10:32:09 2011 +0100
@@ -111,6 +111,18 @@
 #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 @@
 
         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 -r 4e33ab60179a -r 8a817e804d68 tools/libxc/xc_solaris.c
--- a/tools/libxc/xc_solaris.c  Thu Oct 13 10:32:09 2011 +0100
+++ b/tools/libxc/xc_solaris.c  Thu Oct 13 10:32:09 2011 +0100
@@ -322,9 +322,6 @@
         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;
     }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxc: osdep: report missing backends in common code, Xen patchbot-unstable <=