diff options
author | Mark McLoughlin <markmc@redhat.com> | 2007-01-23 14:39:45 +0000 |
---|---|---|
committer | Mark McLoughlin <markmc@redhat.com> | 2007-01-23 14:39:45 +0000 |
commit | e94635c6deebb422306bb7ca2fc4a9002f47242c (patch) | |
tree | 102b04503f77abc8763be4522381f01600258a62 /libvir.c | |
parent | 15d35f3f7676b26ceb6c18095edfd7d24d388dde (diff) | |
download | libvirt-python-v6-e94635c6deebb422306bb7ca2fc4a9002f47242c.tar.gz libvirt-python-v6-e94635c6deebb422306bb7ca2fc4a9002f47242c.tar.xz libvirt-python-v6-e94635c6deebb422306bb7ca2fc4a9002f47242c.zip |
Mon Jan 23 14:36:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
* include/libvirt/libvirt.h.in: add VIR_UUID_BUFLEN and
VIR_UUID_STRING_BUFLEN
* libvirt/proxy/libvirt_proxy.c, libvirt/src/hash.c,
libvirt/src/internal.h, libvirt/src/libvirt.c,
libvirt/src/proxy_internal.c, libvirt/src/test.c,
libvirt/src/virsh.c, libvirt/src/xend_internal.c,
libvirt/src/xm_internal.c, libvirt/src/xml.c,
libvirt/python/libvir.c: use them
Diffstat (limited to 'libvir.c')
-rw-r--r-- | libvir.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -349,7 +349,7 @@ libvirt_virNodeGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject * libvirt_virDomainGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; - unsigned char uuid[16]; + unsigned char uuid[VIR_UUID_BUFLEN]; virDomainPtr domain; PyObject *pyobj_domain; int c_retval; @@ -370,7 +370,7 @@ libvirt_virDomainGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { Py_INCREF(Py_None); return(Py_None); } - py_retval = PyString_FromStringAndSize((char *) &uuid[0], 16); + py_retval = PyString_FromStringAndSize((char *) &uuid[0], VIR_UUID_BUFLEN); return(py_retval); } @@ -388,7 +388,7 @@ libvirt_virDomainLookupByUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { return(NULL); conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn); - if ((uuid == NULL) || (len != 16)) { + if ((uuid == NULL) || (len != VIR_UUID_BUFLEN)) { Py_INCREF(Py_None); return(Py_None); } |