<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libvirt-python-split.git, branch v0.9.11.9</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/'/>
<entry>
<title>python: fix snapshot listing bugs</title>
<updated>2012-06-14T22:38:27+00:00</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2012-06-11T20:49:03+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=23bd7c367bd8d28f20a3a106a93429d205bf3370'/>
<id>23bd7c367bd8d28f20a3a106a93429d205bf3370</id>
<content type='text'>
Python exceptions are different than libvirt errors, and we had
some corner case bugs on OOM situations.

* python/libvirt-override.c (libvirt_virDomainSnapshotListNames)
(libvirt_virDomainSnapshotListChildrenNames): Use correct error
returns, avoid segv on OOM, and avoid memory leaks on error.
(cherry picked from commit a0de5d78ef593958bcb83e563fe54137fe43c4ff)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python exceptions are different than libvirt errors, and we had
some corner case bugs on OOM situations.

* python/libvirt-override.c (libvirt_virDomainSnapshotListNames)
(libvirt_virDomainSnapshotListChildrenNames): Use correct error
returns, avoid segv on OOM, and avoid memory leaks on error.
(cherry picked from commit a0de5d78ef593958bcb83e563fe54137fe43c4ff)
</pre>
</div>
</content>
</entry>
<entry>
<title>python: use simpler methods</title>
<updated>2012-06-14T22:38:27+00:00</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2012-06-11T20:32:47+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=077cbbb583542b6fc872cc464457455724af39e7'/>
<id>077cbbb583542b6fc872cc464457455724af39e7</id>
<content type='text'>
* python/libvirt-override.c (libvirt_virDomainGetVcpus)
(libvirt_virDomainGetVcpuPinInfo): Use Py_XDECREF instead of
open-coding it.
(cherry picked from commit 8566618f65d983b31efb8efec13c25c6410b1718)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* python/libvirt-override.c (libvirt_virDomainGetVcpus)
(libvirt_virDomainGetVcpuPinInfo): Use Py_XDECREF instead of
open-coding it.
(cherry picked from commit 8566618f65d983b31efb8efec13c25c6410b1718)
</pre>
</div>
</content>
</entry>
<entry>
<title>Coverity: Fix the forward_null error in Python binding codes</title>
<updated>2012-06-07T22:15:49+00:00</updated>
<author>
<name>Osier Yang</name>
<email>jyang@redhat.com</email>
</author>
<published>2012-05-02T15:05:59+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=d55bf4d3e48a24871bd5a6a096543f3f7b7d491d'/>
<id>d55bf4d3e48a24871bd5a6a096543f3f7b7d491d</id>
<content type='text'>
Related coverity log:

Error: FORWARD_NULL:
/builddir/build/BUILD/libvirt-0.9.10/python/libvirt-override.c:355:
assign_zero: Assigning: "params" = 0.
/builddir/build/BUILD/libvirt-0.9.10/python/libvirt-override.c:458:
var_deref_model: Passing null variable "params" to function
"getPyVirTypedParameter", which dereferences it. (The dereference is assumed on
the basis of the 'nonnull' parameter attribute.)
(cherry picked from commit b80f4db9931ceea4bec1d178322058df77ece7a4)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Related coverity log:

Error: FORWARD_NULL:
/builddir/build/BUILD/libvirt-0.9.10/python/libvirt-override.c:355:
assign_zero: Assigning: "params" = 0.
/builddir/build/BUILD/libvirt-0.9.10/python/libvirt-override.c:458:
var_deref_model: Passing null variable "params" to function
"getPyVirTypedParameter", which dereferences it. (The dereference is assumed on
the basis of the 'nonnull' parameter attribute.)
(cherry picked from commit b80f4db9931ceea4bec1d178322058df77ece7a4)
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Fix doc directory name for stable releases</title>
<updated>2012-04-27T18:26:26+00:00</updated>
<author>
<name>Cole Robinson</name>
<email>crobinso@redhat.com</email>
</author>
<published>2012-04-27T16:06:34+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=e90c8c4b20ac7c2ba48c0bfc7fb226cdb4fba1d3'/>
<id>e90c8c4b20ac7c2ba48c0bfc7fb226cdb4fba1d3</id>
<content type='text'>
We were using the libvirt release version (like 0.9.11) and not
the configure version (which for stable releases is 0.9.11.X)

Most other places got this right so hopefully that's all the fallout
from the version format change :)

Signed-off-by: Cole Robinson &lt;crobinso@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We were using the libvirt release version (like 0.9.11) and not
the configure version (which for stable releases is 0.9.11.X)

Most other places got this right so hopefully that's all the fallout
from the version format change :)

Signed-off-by: Cole Robinson &lt;crobinso@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix compilation error on 32bit</title>
<updated>2012-04-16T11:40:44+00:00</updated>
<author>
<name>Stefan Berger</name>
<email>stefanb@linux.vnet.ibm.com</email>
</author>
<published>2012-04-10T10:24:03+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=aa898432f174e90b9039d93befe2fd3faa43f1a5'/>
<id>aa898432f174e90b9039d93befe2fd3faa43f1a5</id>
<content type='text'>
Below code failed to compile on a 32 bit machine with error

typewrappers.c: In function 'libvirt_intUnwrap':
typewrappers.c:135:5: error: logical 'and' of mutually exclusive tests is always false [-Werror=logical-op]
cc1: all warnings being treated as errors

The patch fixes this error.

(cherry picked from commit 4e9bb1dffdf456282b69ab077288c9bf875b8afa)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Below code failed to compile on a 32 bit machine with error

typewrappers.c: In function 'libvirt_intUnwrap':
typewrappers.c:135:5: error: logical 'and' of mutually exclusive tests is always false [-Werror=logical-op]
cc1: all warnings being treated as errors

The patch fixes this error.

(cherry picked from commit 4e9bb1dffdf456282b69ab077288c9bf875b8afa)
</pre>
</div>
</content>
</entry>
<entry>
<title>python: improve conversion validation</title>
<updated>2012-03-31T15:16:00+00:00</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2012-03-30T18:03:20+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=8228a55140f0dac5ddb1e4d78dc899d428e1e07b'/>
<id>8228a55140f0dac5ddb1e4d78dc899d428e1e07b</id>
<content type='text'>
Laszlo Ersek pointed out that in trying to convert a long to an
unsigned int, we used:

long long_val = ...;
if ((unsigned int)long_val == long_val)

According to C99 integer promotion rules, the if statement is
equivalent to:

(unsigned long)(unsigned int)long_val == (unsigned long)long_val

since you get an unsigned comparison if at least one side is
unsigned, using the largest rank of the two sides; but on 32-bit
platforms, where unsigned long and unsigned int are the same size,
this comparison is always true and ends up converting negative
long_val into posigive unsigned int values, rather than rejecting
the negative value as we had originally intended (python longs
are unbounded size, and we don't want to do silent modulo
arithmetic when converting to C code).

Fix this by using direct comparisons, rather than casting.

* python/typewrappers.c (libvirt_intUnwrap, libvirt_uintUnwrap)
(libvirt_ulongUnwrap, libvirt_ulonglongUnwrap): Fix conversion
checks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Laszlo Ersek pointed out that in trying to convert a long to an
unsigned int, we used:

long long_val = ...;
if ((unsigned int)long_val == long_val)

According to C99 integer promotion rules, the if statement is
equivalent to:

(unsigned long)(unsigned int)long_val == (unsigned long)long_val

since you get an unsigned comparison if at least one side is
unsigned, using the largest rank of the two sides; but on 32-bit
platforms, where unsigned long and unsigned int are the same size,
this comparison is always true and ends up converting negative
long_val into posigive unsigned int values, rather than rejecting
the negative value as we had originally intended (python longs
are unbounded size, and we don't want to do silent modulo
arithmetic when converting to C code).

Fix this by using direct comparisons, rather than casting.

* python/typewrappers.c (libvirt_intUnwrap, libvirt_uintUnwrap)
(libvirt_ulongUnwrap, libvirt_ulonglongUnwrap): Fix conversion
checks.
</pre>
</div>
</content>
</entry>
<entry>
<title>python: make python APIs use these helper functions</title>
<updated>2012-03-28T14:54:06+00:00</updated>
<author>
<name>Guannan Ren</name>
<email>gren@redhat.com</email>
</author>
<published>2012-03-27T06:06:47+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=e967d582f973a4f37db1526f5e455ea643294740'/>
<id>e967d582f973a4f37db1526f5e455ea643294740</id>
<content type='text'>
    *setPyVirTypedParameter
    *libvirt_virDomainGetCPUStats
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    *setPyVirTypedParameter
    *libvirt_virDomainGetCPUStats
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Add new helper functions for python to C integral conversion</title>
<updated>2012-03-28T14:42:40+00:00</updated>
<author>
<name>Guannan Ren</name>
<email>gren@redhat.com</email>
</author>
<published>2012-03-27T06:06:10+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=db3debebf058b47328df47137b505e80b4adca08'/>
<id>db3debebf058b47328df47137b505e80b4adca08</id>
<content type='text'>
    int libvirt_intUnwrap(PyObject *obj, int *val);
    int libvirt_uintUnwrap(PyObject *obj, unsigned int *val);
    int libvirt_longUnwrap(PyObject *obj, long *val);
    int libvirt_ulongUnwrap(PyObject *obj, unsigned long *val);
    int libvirt_longlongUnwrap(PyObject *obj, long long *val);
    int libvirt_ulonglongUnwrap(PyObject *obj, unsigned long long *val);
    int libvirt_doubleUnwrap(PyObject *obj, double *val);
    int libvirt_boolUnwrap(PyObject *obj, bool *val);
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    int libvirt_intUnwrap(PyObject *obj, int *val);
    int libvirt_uintUnwrap(PyObject *obj, unsigned int *val);
    int libvirt_longUnwrap(PyObject *obj, long *val);
    int libvirt_ulongUnwrap(PyObject *obj, unsigned long *val);
    int libvirt_longlongUnwrap(PyObject *obj, long long *val);
    int libvirt_ulonglongUnwrap(PyObject *obj, unsigned long long *val);
    int libvirt_doubleUnwrap(PyObject *obj, double *val);
    int libvirt_boolUnwrap(PyObject *obj, bool *val);
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup for a return statement in source files</title>
<updated>2012-03-26T20:45:22+00:00</updated>
<author>
<name>Martin Kletzander</name>
<email>mkletzan@redhat.com</email>
</author>
<published>2012-03-22T11:33:35+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=a8e031a749d4e67a27cb2004b7c50f0456ecc401'/>
<id>a8e031a749d4e67a27cb2004b7c50f0456ecc401</id>
<content type='text'>
Return statements with parameter enclosed in parentheses were modified
and parentheses were removed. The whole change was scripted, here is how:

List of files was obtained using this command:
git grep -l -e '\&lt;return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
grep -e '\.[ch]$' -e '\.py$'

Found files were modified with this command:
sed -i -e                                                                 \
's_^\(.*\&lt;return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
-e 's_^\(.*\&lt;return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'

Then checked for nonsense.

The whole command looks like this:
git grep -l -e '\&lt;return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e                            \
's_^\(.*\&lt;return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
-e 's_^\(.*\&lt;return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Return statements with parameter enclosed in parentheses were modified
and parentheses were removed. The whole change was scripted, here is how:

List of files was obtained using this command:
git grep -l -e '\&lt;return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
grep -e '\.[ch]$' -e '\.py$'

Found files were modified with this command:
sed -i -e                                                                 \
's_^\(.*\&lt;return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
-e 's_^\(.*\&lt;return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'

Then checked for nonsense.

The whole command looks like this:
git grep -l -e '\&lt;return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' |             \
grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e                            \
's_^\(.*\&lt;return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \
-e 's_^\(.*\&lt;return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for the suspend event</title>
<updated>2012-03-23T15:12:18+00:00</updated>
<author>
<name>Osier Yang</name>
<email>jyang@redhat.com</email>
</author>
<published>2012-03-23T14:50:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/berrange/public_git/libvirt-python-split.git/commit/?id=dc2f75d35a6461c896a738d092dc973067d0dbd4'/>
<id>dc2f75d35a6461c896a738d092dc973067d0dbd4</id>
<content type='text'>
This patch introduces a new event type for the QMP event
SUSPEND:

    VIR_DOMAIN_EVENT_ID_PMSUSPEND

The event doesn't take any data, but considering there might
be reason for wakeup in future, the callback definition is:

typedef void
(*virConnectDomainEventSuspendCallback)(virConnectPtr conn,
                                        virDomainPtr dom,
                                        int reason,
                                        void *opaque);

"reason" is unused currently, always passes "0".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces a new event type for the QMP event
SUSPEND:

    VIR_DOMAIN_EVENT_ID_PMSUSPEND

The event doesn't take any data, but considering there might
be reason for wakeup in future, the callback definition is:

typedef void
(*virConnectDomainEventSuspendCallback)(virConnectPtr conn,
                                        virDomainPtr dom,
                                        int reason,
                                        void *opaque);

"reason" is unused currently, always passes "0".
</pre>
</div>
</content>
</entry>
</feed>
