[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxc: remove xc_get_bit_size() from tools/libxc/xc_dom_compat_linux.c
commit 2e5ed3456a017452824b1def76afbf6494ddfc7f Author: Juergen Gross <jgross@xxxxxxxx> AuthorDate: Fri Oct 23 15:05:01 2015 +0200 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Mon Nov 16 11:21:20 2015 +0000 libxc: remove xc_get_bit_size() from tools/libxc/xc_dom_compat_linux.c 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@xxxxxxxx> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxc/include/xenguest.h | 4 ---- tools/libxc/xc_dom_compat_linux.c | 25 ------------------------- tools/python/xen/lowlevel/xc/xc.c | 28 ---------------------------- 3 files changed, 0 insertions(+), 57 deletions(-) diff --git a/tools/libxc/include/xenguest.h b/tools/libxc/include/xenguest.h index a9fa32c..8f918b1 100644 --- a/tools/libxc/include/xenguest.h +++ b/tools/libxc/include/xenguest.h @@ -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); diff --git a/tools/libxc/xc_dom_compat_linux.c b/tools/libxc/xc_dom_compat_linux.c index 20521cf..abbc09f 100644 --- a/tools/libxc/xc_dom_compat_linux.c +++ b/tools/libxc/xc_dom_compat_linux.c @@ -34,31 +34,6 @@ /* ------------------------------------------------------------------------ */ -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, diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 94f0a13..d75f98c 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -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" -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |