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@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
Juergen Gross authored and Ian Campbell committed 2015-11-16 11:21:20 +00:00
1 parent 512d4d9605
commit 2e5ed3456a
3 files changed
-57

No files matched your search

-4
View 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);
-25
View File
@@ -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,
-28
View 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"
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.