diff options
author | Gui Jianfeng <guijianfeng@cn.fujitsu.com> | 2011-02-22 13:30:33 +0800 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2011-03-10 17:53:16 -0700 |
commit | f9b0014ec10e3c031e0cdbd90ae9c2ba5698804e (patch) | |
tree | 1a19d8ce38568ea1b410e451c4cdbb39db88e85b | |
parent | 15c255ca8a58335d1e8f2a352740e37ff384d573 (diff) | |
download | libvirt-python-v6-f9b0014ec10e3c031e0cdbd90ae9c2ba5698804e.tar.gz libvirt-python-v6-f9b0014ec10e3c031e0cdbd90ae9c2ba5698804e.tar.xz libvirt-python-v6-f9b0014ec10e3c031e0cdbd90ae9c2ba5698804e.zip |
libvirt: add virDomain{Get,Set}BlkioParametersCVE-2011-1146
Add virDomainSetBlkioParameters virDomainGetBlkioParameters
Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
-rwxr-xr-x | generator.py | 2 | ||||
-rw-r--r-- | libvirt-override-api.xml | 12 | ||||
-rw-r--r-- | libvirt-override.c | 21 |
3 files changed, 34 insertions, 1 deletions
diff --git a/generator.py b/generator.py index ee9dfe4..6f4bb40 100755 --- a/generator.py +++ b/generator.py @@ -306,6 +306,8 @@ skip_impl = ( 'virDomainGetSchedulerType', 'virDomainGetSchedulerParameters', 'virDomainSetSchedulerParameters', + 'virDomainSetBlkioParameters', + 'virDomainGetBlkioParameters', 'virDomainSetMemoryParameters', 'virDomainGetMemoryParameters', 'virDomainGetVcpus', diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml index f209608..54deeb5 100644 --- a/libvirt-override-api.xml +++ b/libvirt-override-api.xml @@ -162,6 +162,18 @@ <arg name='domain' type='virDomainPtr' info='pointer to domain object'/> <arg name='params' type='virSchedParameterPtr' info='pointer to scheduler parameter objects'/> </function> + <function name='virDomainSetBlkioParameters' file='python'> + <info>Change the blkio tunables</info> + <return type='int' info='-1 in case of error, 0 in case of success.'/> + <arg name='domain' type='virDomainPtr' info='pointer to domain object'/> + <arg name='params' type='virBlkioParameterPtr' info='pointer to blkio tunable objects'/> + </function> + <function name='virDomainGetBlkioParameters' file='python'> + <info>Get the blkio parameters, the @params array will be filled with the values.</info> + <return type='int' info='-1 in case of error, 0 in case of success.'/> + <arg name='domain' type='virDomainPtr' info='pointer to domain object'/> + <arg name='params' type='virBlkioParameterPtr' info='pointer to blkio tunable objects'/> + </function> <function name='virDomainSetMemoryParameters' file='python'> <info>Change the memory tunables</info> <return type='int' info='-1 in case of error, 0 in case of success.'/> diff --git a/libvirt-override.c b/libvirt-override.c index 4a03d72..4a9b432 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -4,7 +4,7 @@ * entry points where an automatically generated stub is * unpractical * - * Copyright (C) 2005, 2007-2010 Red Hat, Inc. + * Copyright (C) 2005, 2007-2011 Red Hat, Inc. * * Daniel Veillard <veillard@redhat.com> */ @@ -371,6 +371,23 @@ libvirt_virDomainSetSchedulerParameters(PyObject *self ATTRIBUTE_UNUSED, return VIR_PY_INT_SUCCESS; } + + + +/* FIXME: This is a place holder for the implementation. */ +static PyObject * +libvirt_virDomainSetBlkioParameters(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args ATTRIBUTE_UNUSED) { + return VIR_PY_INT_FAIL; +} + +/* FIXME: This is a place holder for the implementation. */ +static PyObject * +libvirt_virDomainGetBlkioParameters(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args ATTRIBUTE_UNUSED) { + return VIR_PY_INT_FAIL; +} + /* FIXME: This is a place holder for the implementation. */ static PyObject * libvirt_virDomainSetMemoryParameters(PyObject *self ATTRIBUTE_UNUSED, @@ -3532,6 +3549,8 @@ static PyMethodDef libvirtMethods[] = { {(char *) "virDomainGetSchedulerType", libvirt_virDomainGetSchedulerType, METH_VARARGS, NULL}, {(char *) "virDomainGetSchedulerParameters", libvirt_virDomainGetSchedulerParameters, METH_VARARGS, NULL}, {(char *) "virDomainSetSchedulerParameters", libvirt_virDomainSetSchedulerParameters, METH_VARARGS, NULL}, + {(char *) "virDomainSetBlkioParameters", libvirt_virDomainSetBlkioParameters, METH_VARARGS, NULL}, + {(char *) "virDomainGetBlkioParameters", libvirt_virDomainGetBlkioParameters, METH_VARARGS, NULL}, {(char *) "virDomainSetMemoryParameters", libvirt_virDomainSetMemoryParameters, METH_VARARGS, NULL}, {(char *) "virDomainGetMemoryParameters", libvirt_virDomainGetMemoryParameters, METH_VARARGS, NULL}, {(char *) "virDomainGetVcpus", libvirt_virDomainGetVcpus, METH_VARARGS, NULL}, |