| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
python2 will be end of life by the time of the next
libvirt release. All our supported build targets, including
CentOS7, have a python3 build available.
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
| |
Function libvirt_charPtrUnwrap() either fails or always sets the
unwrapped string so there is no need to check it explicitly.
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
|
|
|
|
|
| |
Commit <57a160b5248ba47d4e1c9d22d95847dad8e0524f> removed last usage
but did not remove the function itself.
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Latest GCC versions are unhappy with us treating an integer
arithmetic result as a boolean:
libvirt-utils.c: In function ‘virReallocN’:
libvirt-utils.c:111:23: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]
if (!tmp && (size * count)) {
~~~~~~^~~~~~~~
Add an explicit comparison '!= 0' to keep it happy, since its
suggestion to use '&&' is nonsense.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
| |
When python3 builds C modules, it adds the -Wsign-compare flag to GCC.
This creates lots of warnings where we compare a 'size_t' value against
an 'int' value due to signed/unsigned difference. Change all the size_t
types to ssize_t to address this.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
If we pass large(more than cpunum) cpu mask to any libvirt_virDomainPin*
function, it could leads to crash. So we have to check tuple size in
virPyCpumapConvert and ignore extra tuple members.
Since we allocate a zeroed buffer, we don't need to bother with setting
the bits to zero.
Signed-off-by: Konstantin Neumoin <kneumoin@virtuozzo.com>
|
|
|
|
|
|
|
|
| |
All libvirt_virDomainPin* functions do the same thing for convert
pycpumap to cpumap, so this patch moves all common logic to new
helper - virPyCpumapConvert.
Signed-off-by: Konstantin Neumoin <kneumoin@virtuozzo.com>
|
|
|
|
| |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
|
| |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
|
|
|
| |
Follow the libvirt hacking guide and make the code consistent.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
|
| |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
|
|
|
|
| |
virTypedParamsClear() and virTypedParamsFree() were introduced in
libvirt 1.0.2. In an effort to keep the code clean bring these two
functions to libvirt-python if we're building against a version of
libvirt that's older than 1.0.2
|
|
|
|
|
|
| |
Import the macro for safely closing file descriptors
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|
Import the libvirt memory allocation functions, stripping the OOM
testing and error reporting pieces.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|