]> xenbits.xensource.com Git - people/julieng/xen-unstable.git/commitdiff
libxc: remove xc_get_bit_size() from tools/libxc/xc_dom_compat_linux.c
authorJuergen Gross <jgross@suse.com>
Fri, 23 Oct 2015 13:05:01 +0000 (15:05 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 16 Nov 2015 11:21:20 +0000 (11:21 +0000)
xc_get_bit_size() is being used by the unused python wrapper
xc.getBitSize() only. Remove the wrapper and xc_get_bit_size().

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/include/xenguest.h
tools/libxc/xc_dom_compat_linux.c
tools/python/xen/lowlevel/xc/xc.c

index a9fa32c09575f2cbc95dad94208d2163f826363b..8f918b1cec3a88664fcc3cf3c5122f1fedbc0216 100644 (file)
@@ -184,10 +184,6 @@ int xc_await_suspend(xc_interface *xch, xc_evtchn *xce, int suspend_evtchn);
 int xc_suspend_evtchn_init_sane(xc_interface *xch, xc_evtchn *xce,
                                 int domid, int port, int *lockfd);
 
-int xc_get_bit_size(xc_interface *xch,
-                    const char *image_name, const char *cmdline,
-                    const char *features, int *type);
-
 int xc_mark_page_online(xc_interface *xch, unsigned long start,
                         unsigned long end, uint32_t *status);
 
index 20521cf5f5b17a60d29d1ab946a9e9093fe5ffb3..abbc09f24abb013985174c14335b292008fe8101 100644 (file)
 
 /* ------------------------------------------------------------------------ */
 
-int xc_get_bit_size(xc_interface *xch,
-                    const char *image_name, const char *cmdline,
-                    const char *features, int *bit_size)
-{
-    struct xc_dom_image *dom;
-    int rc;
-    *bit_size = 0;
-    dom = xc_dom_allocate(xch, cmdline, features);
-    if (dom == NULL)
-        return -1;
-    if ( (rc = xc_dom_kernel_file(dom, image_name)) != 0 )
-        goto out;
-    if ( (rc = xc_dom_parse_image(dom)) != 0 )
-        goto out;
-    if( dom->guest_type != NULL){
-        if(strstr(dom->guest_type, "x86_64") != NULL)
-            *bit_size = X86_64_B_SIZE; //64bit Guest
-        if(strstr(dom->guest_type, "x86_32") != NULL)
-            *bit_size = X86_32_B_SIZE; //32bit Guest
-    }
- out:
-    xc_dom_release(dom);
-    return rc;
-}
-
 int xc_linux_build(xc_interface *xch, uint32_t domid,
                    unsigned int mem_mb,
                    const char *image_name,
index 94f0a13d793e1328170ae6f7dec6535080b2e1aa..d75f98c0ff870578165d1042da8e63f697ef8be0 100644 (file)
@@ -6,7 +6,6 @@
 
 #include <Python.h>
 #include <xenctrl.h>
-#include <xenguest.h>
 #include <fcntl.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
@@ -431,26 +430,6 @@ static PyObject *pyxc_vcpu_getinfo(XcObject *self,
     return info_dict;
 }
 
-static PyObject *pyxc_getBitSize(XcObject *self,
-                                    PyObject *args,
-                                    PyObject *kwds)
-{
-    PyObject *info_type;
-    char *image = NULL, *cmdline = "", *features = NULL;
-    int type = 0;
-    static char *kwd_list[] = { "image", "cmdline", "features", NULL };
-    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "sss", kwd_list,
-                                      &image, &cmdline, &features) )
-        return NULL;
-
-    xc_get_bit_size(self->xc_handle, image, cmdline, features, &type);
-    if (type < 0)
-        return pyxc_error_to_exception(self->xc_handle);
-    info_type = Py_BuildValue("{s:i}",
-                              "type", type);
-    return info_type;
-}
-
 static PyObject *pyxc_hvm_param_get(XcObject *self,
                                     PyObject *args,
                                     PyObject *kwds)
@@ -2182,13 +2161,6 @@ static PyMethodDef pyxc_methods[] = {
       " cpumap   [int]:  Bitmap of CPUs this VCPU can run on\n"
       " cpu      [int]:  CPU that this VCPU is currently bound to\n" },
 
-    {"getBitSize",
-      (PyCFunction)pyxc_getBitSize,
-      METH_VARARGS | METH_KEYWORDS, "\n"
-      "Get the bitsize of a guest OS.\n"
-      " image   [str]:      Name of kernel image file. May be gzipped.\n"
-      " cmdline [str, n/a]: Kernel parameters, if any.\n\n"},
-
     { "gnttab_hvm_seed",
       (PyCFunction)pyxc_gnttab_hvm_seed,
       METH_KEYWORDS, "\n"