[libvirt] [PATCH 0/4] qemu: add boot order support for redirected and host USB devices

2012-11-20 Thread Ján Tomko
Commit a4c19459aa8634c43b51e8138fb1d7eec4c17824 missed the functionality for redirected USB devices (fixed in 1/4), documentation and tests. https://bugzilla.redhat.com/show_bug.cgi?id=805414 Ján Tomko (4): conf: add support for booting from redirected USB devices docs: boot order for host

[libvirt] [PATCH 1/4] conf: add support for booting from redirected USB devices

2012-11-20 Thread Ján Tomko
Commit a4c19459aa8634c43b51e8138fb1d7eec4c17824 only added the QEMU capability flag, command line option and added the boot element for redirdev's in the XML schema. This patch adds support for parsing and writing the XML with redirdevs with the boot flag. It also ignores unknown XML elements in

[libvirt] [PATCH 4/4] tests: update qemuhelptest data

2012-11-20 Thread Ján Tomko
Both generated with qemu-system-x86_64 --help qemu-1.2.0 qemu-system-x86_64 \ -device ? \ -device pci-assign,? \ -device virtio-blk-pci,? \ -device virtio-net-pci,? \ -device scsi-disk,? \ -device PIIX4_PM,? \ -device usb-redir,? \ -device ide-drive,? \ -device usb-host,? 2 qemu-1.2.0-device It

[libvirt] [PATCH 2/4] docs: boot order for host and redirected USB devices

2012-11-20 Thread Ján Tomko
And a few spaces. --- docs/formatdomain.html.in | 27 +++ 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index c8da33d..6a3b976 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in

[libvirt] [PATCH 3/4] tests: add boot order for host and redirected USB to qemu argv test

2012-11-20 Thread Ján Tomko
--- ...muxml2argv-hostdev-usb-address-device-boot.args |6 +++ ...emuxml2argv-hostdev-usb-address-device-boot.xml | 28 + .../qemuxml2argv-usb-redir-boot.args | 10 + .../qemuxml2argv-usb-redir-boot.xml| 42

Re: [libvirt] libvirt-1.0 fails virdrivermoduletest

2012-11-21 Thread Ján Tomko
On 11/20/12 20:36, Toralf Förster wrote: n22 /var/tmp/portage/app-emulation/libvirt-1.0.0/work/libvirt-1.0.0/tests # VIR_TEST_DEBUG=1 ./virdrivermoduletest TEST: virdrivermoduletest 1) Test driver storage ... OK 2) Test driver nodedev

Re: [libvirt] libvirt-1.0 fails virdrivermoduletest

2012-11-21 Thread Ján Tomko
On 11/21/12 10:06, Daniel P. Berrange wrote: On Wed, Nov 21, 2012 at 09:22:25AM +0100, Ján Tomko wrote: On 11/20/12 20:36, Toralf Förster wrote: n22 /var/tmp/portage/app-emulation/libvirt-1.0.0/work/libvirt-1.0.0/tests # VIR_TEST_DEBUG=1 ./virdrivermoduletest TEST: virdrivermoduletest 1

[libvirt] [PATCH] build: fix build --without-network

2012-11-21 Thread Ján Tomko
bridge_driver.h: silence gcc warnings: statement with no effect [-Wunused-value] unused variable 'net' [-Wunused-variable] virdrivermoduletest.c: don't require network driver module if it hasn't been built. --- src/network/bridge_driver.h |4 ++-- tests/virdrivermoduletest.c |8

Re: [libvirt] [PATCH] Correct include-password option for domdisplay

2012-11-21 Thread Ján Tomko
On 11/21/12 16:37, Martin Kletzander wrote: The 'virsh domdisplay' command is able to display the password configured for spice, but it was missing for vnc type graphics. This is just a simple patch for that to work properly. --- tools/virsh-domain.c | 17 + 1 file changed,

Re: [libvirt] [PATCH] Correct include-password option for domdisplay

2012-11-21 Thread Ján Tomko
On 11/21/12 17:13, Martin Kletzander wrote: On 11/21/2012 05:06 PM, Ján Tomko wrote: Wouldn't it be better to put the password before the host (vnc://:passwd@host:port) so that at least some clients (krdc from the few that I've tried) can understand the whole URI? Jan TBH, I don't get

Re: [libvirt] [PATCH] Correct include-password option for domdisplay

2012-11-22 Thread Ján Tomko
On 11/22/12 11:03, Martin Kletzander wrote: I'll rework it to make it as URI as possible then. Just one question, though (for anyone, I guess); why do we append port as a parameter for spice scheme? Martin I think it's because of what spicy supported initially (since v0.1.0):

Re: [libvirt] [BUG] storage.xml: owner|group=-1 → 2^32-1 on 32 Bit

2012-11-23 Thread Ján Tomko
On 11/23/12 15:17, Philipp Hahn wrote: Hello, when you install and use libvirt in a 32 bit environment, the handling of owner and group in /etc/libvirt/storage/*.xml is broken: The initial -1 is printed as an unsigned int and is thus converted to +(2^32-1): ... When you next restart

[libvirt] [PATCH] storage: fix logical volume cloning

2012-11-24 Thread Ján Tomko
Commit 258e06c removed setting of the volume type to VIR_STORAGE_VOL_BLOCK, which leads to failures in storageVolumeCreateXMLFrom. The type (and target.format) of the volume was set to zero. In virStorageBackendGetBuildVolFromFunction, this gets interpreted as VIR_STORAGE_FILE_NONE and the

[libvirt] [PATCH] qemu: fix a crash when save file can't be opened

2012-11-28 Thread Ján Tomko
In qemuDomainSaveMemory, wrapperFd might be NULL and should be checked before calling virFileWrapperFdCatchError. Same in doCoreDump. Bug: https://bugzilla.redhat.com/show_bug.cgi?id=880919 --- src/qemu/qemu_driver.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH 4/7] libssh2_session: support DSS keys as well

2012-11-28 Thread Ján Tomko
Missing break in the switch. --- src/rpc/virnetsshsession.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c index 13a0368..286cc4d 100644 --- a/src/rpc/virnetsshsession.c +++ b/src/rpc/virnetsshsession.c @@ -412,6

[libvirt] [PATCH 1/7] nwfilter: fix NULL pointer check in virNWFilterSnoopReqNew

2012-11-28 Thread Ján Tomko
This can't lead to a crash since virNWFilterSnoopReqNew is only called with a static array as the argument, but if we check for NULL we should do it right. --- src/nwfilter/nwfilter_dhcpsnoop.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH 0/?] Various issues found by coverity

2012-11-28 Thread Ján Tomko
Ján Tomko (7): nwfilter: fix NULL pointer check in virNWFilterSnoopReqNew conf: prevent crash with no uuid in cephx auth secret cgroup: fix impossible overrun in virCgroupAddTaskController libssh2_session: support DSS keys as well virsh: fix error messages in iface-bridge conf: check

[libvirt] [PATCH 6/7] conf: check the return value of virXPathNodeSet

2012-11-28 Thread Ján Tomko
In a few places, the return value could get passed to VIR_ALLOC_N without being checked, resulting in a request to allocate a lot of memory if the return value was negative. --- src/conf/domain_conf.c |8 ++-- src/conf/storage_conf.c |4 +++- 2 files changed, 9 insertions(+), 3

[libvirt] [PATCH 7/7] conf: snapshot: check return value of virDomainSnapshotObjListNum

2012-11-28 Thread Ján Tomko
If it's negative, this might result in a request to allocate lots of memory. --- src/conf/snapshot_conf.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 72bdd30..06be34d 100644 --- a/src/conf/snapshot_conf.c +++

[libvirt] [PATCH 3/7] cgroup: fix impossible overrun in virCgroupAddTaskController

2012-11-28 Thread Ján Tomko
The size of the controllers array is VIR_CGROUP_CONTROLLER_LAST, however we only call it with values less than VIR_CGROUP_CONTROLLER_LAST. --- src/util/cgroup.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/util/cgroup.c b/src/util/cgroup.c index 9e78314..490f1de

[libvirt] [PATCH 2/7] conf: prevent crash with no uuid in cephx auth secret

2012-11-28 Thread Ján Tomko
Also remove the pointles check for NULL in auth.cephx.secret.uuid, since this is a static array. --- src/conf/storage_conf.c |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 1c9934c..5a2cf1b 100644 ---

[libvirt] [PATCH 5/7] virsh: fix error messages in iface-bridge

2012-11-28 Thread Ján Tomko
The error messages did not correspond to the attributes they printed. --- tools/virsh-interface.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c index 9ceb122..3be6d60 100644 --- a/tools/virsh-interface.c +++

[libvirt] [PATCH] util: check for NULL parameter in virFileWrapperFdCatchError

2012-11-28 Thread Ján Tomko
This reverts 8927c0e qemu: fix a crash when save file can't be opened and allows virFileWrapperFdCatchError to be called with NULL instead. --- src/qemu/qemu_driver.c |6 ++ src/util/virfile.c |2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git

[libvirt] [PATCH 1/6] conf: fix NULL check in virNetDevBandwidthParse

2012-11-29 Thread Ján Tomko
Found by coverity: Error: REVERSE_INULL (CWE-476): libvirt-0.10.2/src/conf/netdev_bandwidth_conf.c:99: deref_ptr: Directly dereferencing pointer node. libvirt-0.10.2/src/conf/netdev_bandwidth_conf.c:107: check_after_deref: Null-checking node suggests that it may be null, but it

[libvirt] [PATCH 0/6] More coverity issues

2012-11-29 Thread Ján Tomko
REVERSE_INULL, SIZEOF_MISMATCH and some uninitialized variables. Ján Tomko (6): conf: fix NULL check in virNetDevBandwidthParse util: fix virBitmap allocation in virProcessInfoGetAffinity virsh: use correct sizeof when allocating cpumap virsh: do timing even for unusable connections rpc

[libvirt] [PATCH 2/6] util: fix virBitmap allocation in virProcessInfoGetAffinity

2012-11-29 Thread Ján Tomko
Found by coverity: Error: REVERSE_INULL (CWE-476): libvirt-0.10.2/src/util/processinfo.c:141: deref_ptr: Directly dereferencing pointer map. libvirt-0.10.2/src/util/processinfo.c:142: check_after_deref: Null-checking map suggests that it may be null, but it has already been

[libvirt] [PATCH 3/6] virsh: use correct sizeof when allocating cpumap

2012-11-29 Thread Ján Tomko
Found by coverity: Error: SIZEOF_MISMATCH (CWE-569): libvirt-0.10.2/tools/virsh-domain.c:4754: suspicious_sizeof: Passing argument 8UL /* sizeof (cpumap) */ to function _vshCalloc(vshControl *, size_t, size_t, char const *, int) and then casting the return value to unsigned char *

[libvirt] [PATCH 5/6] rpc: don't destroy xdr before creating it in virNetMessageEncodeHeader

2012-11-29 Thread Ján Tomko
On OOM, xdr_destroy got called on xdr even though it wasn't created yet. Found by coverity: Error: UNINIT (CWE-457): libvirt-0.10.2/src/rpc/virnetmessage.c:214: var_decl: Declaring variable xdr without initializer. libvirt-0.10.2/src/rpc/virnetmessage.c:219: cond_true: Condition

[libvirt] [PATCH 6/6] conf: fix uninitialized variable in virDomainListSnapshots

2012-11-29 Thread Ján Tomko
If allocation of names fails, list is uninitialized. --- src/conf/snapshot_conf.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 06be34d..bba1bb7 100644 --- a/src/conf/snapshot_conf.c +++

[libvirt] [PATCH 4/6] virsh: do timing even for unusable connections

2012-11-29 Thread Ján Tomko
Time values were uninitialized if the connection wasn't usable. --- tools/virsh.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 6372177..dea3f82 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -1562,20 +1562,20 @@

Re: [libvirt] [PATCH 2/7] conf: prevent crash with no uuid in cephx auth secret

2012-11-29 Thread Ján Tomko
On 11/28/12 15:31, Osier Yang wrote: On 2012年11月28日 21:34, Ján Tomko wrote: Also remove the pointles check for NULL in auth.cephx.secret.uuid, since this is a static array. It's nice if there is log of coverity. Error: FORWARD_NULL (CWE-476): libvirt-0.10.2/src/conf/storage_conf.c:447

[libvirt] [PATCH v2] conf: prevent crash with no uuid in cephx auth secret

2012-11-29 Thread Ján Tomko
Also remove the pointless check for NULL in auth.cephx.secret.uuid, since this is a static array. --- src/conf/storage_conf.c |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 3fdc5b6..99c2e52 100644 ---

[libvirt] [PATCH 0/2] Last two coverity patches

2012-11-30 Thread Ján Tomko
tools/virsh-pool.c: CHECKED_RETURN src/nwfilter/nwfilter_driver.c: UNREACHABLE Ján Tomko (2): virsh: check the return value of virStoragePoolGetAutostart nwfilter: fix error handling src/nwfilter/nwfilter_driver.c | 11 +-- tools/virsh-pool.c |5 + 2 files

[libvirt] [PATCH 1/2] virsh: check the return value of virStoragePoolGetAutostart

2012-11-30 Thread Ján Tomko
On error, virStoragePoolGetAutostart would return -1 leaving autostart untouched. Removed the misleading debug message as well. Error: CHECKED_RETURN (CWE-252): libvirt-0.10.2/tools/virsh-pool.c:1386: unchecked_value: No check of the return value of virStoragePoolGetAutostart(pool,

[libvirt] [PATCH 2/2] nwfilter: fix error handling

2012-11-30 Thread Ján Tomko
Commit 4efde75f introduced a return in the cleanup path and removed virNWFilterConfLayerShutdown. Found by coverity: Error: UNREACHABLE (CWE-561): libvirt-0.10.2/src/nwfilter/nwfilter_driver.c:259: unreachable: This code cannot be reached: nwfilterDriverUnlock(driver --- I wonder if

[libvirt] [PATCH] nwfilter: report an error on OOM

2012-11-30 Thread Ján Tomko
Also removed some unreachable code found by coverity: libvirt-0.10.2/src/nwfilter/nwfilter_driver.c:259: unreachable: This code cannot be reached: nwfilterDriverUnlock(driver --- diff to v1: don't break everything src/nwfilter/nwfilter_driver.c |9 - 1 files changed, 4

[libvirt] [PATCH v3 0/2] storage: allow metadata preallocation when creating qcow2 images

2012-12-05 Thread Ján Tomko
* fixed spaces to pass syntax-check * !! for unsigned - bool conversion * initialize flags in cmdVolCreateFrom and cmdVolClone Ján Tomko (2): storage: allow metadata preallocation when creating qcow2 images virsh: allow metadata preallocation when creating volumes include/libvirt/libvirt.h.in

[libvirt] [PATCH v3 1/2] storage: allow metadata preallocation when creating qcow2 images

2012-12-05 Thread Ján Tomko
Add VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA flag to virStorageVolCreateXML and virStorageVolCreateXMLFrom. This flag requests metadata preallocation when creating/cloning qcow2 images, resulting in creating a sparse file with qcow2 metadata. It has only slightly larger disk usage compared to new

[libvirt] [PATCH v3 2/2] virsh: allow metadata preallocation when creating volumes

2012-12-05 Thread Ján Tomko
Add --prealloc-metadata flag to these commands: vol-clone vol-create vol-create-as vol-create-from --- tools/virsh-volume.c | 25 + tools/virsh.pod | 23 --- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/tools/virsh-volume.c

[libvirt] [PATCH] qemu: assume seccomp sandbox is supported since qemu 1.2

2012-12-10 Thread Ján Tomko
Currently there is no way to detect it via QMP and requesting -sandbox off works correctly even if it was compiled out, so this will work unless someone both requests the sandbox in qemu.conf and builds QEMU without the support for it. --- Relevant discussion in qemu-devel:

[libvirt] [PATCH 0/7] Test parsing of iscsiadm output

2014-03-12 Thread Ján Tomko
Introduce virCommandSetMockOutputFile for faking output of asynchronous commands and use it to test parsing of iscsiadm output in virStorageBackendISCSISession and virStorageBackendISCSIScanTargets Ján Tomko (7): Change virStorageBackendISCSISession 'probe' arg to bool Introduce

[libvirt] [PATCH 1/7] Change virStorageBackendISCSISession 'probe' arg to bool

2014-03-12 Thread Ján Tomko
It quacks like a bool. --- src/storage/storage_backend_iscsi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index ada6c48..531d044 100644 --- a/src/storage/storage_backend_iscsi.c +++

[libvirt] [PATCH 6/7] Add test for virStorageBackendISCSISession

2014-03-12 Thread Ján Tomko
Parse iscsiadm output with and without the recently introduced flashnode info. [1] This should check that commits like 57e17a7 (fixing [2]) do not break iscsiadm output parsing. [1] https://github.com/mikechristie/open-iscsi/commit/181af9a [2] https://bugzilla.redhat.com/show_bug.cgi?id=1067173

[libvirt] [PATCH 3/7] Use size_t for ndevice in pool source definition

2014-03-12 Thread Ján Tomko
This allows it to be used by the VIR_*_ELEMENT macros. Also use them for parsing the definiton and remove the redundant freeing of 'nodeset' before jumping to the cleanup label. --- src/conf/storage_conf.c | 23 ++- src/conf/storage_conf.h | 2 +- 2 files changed, 11

[libvirt] [PATCH 7/7] Add a test for virStorageBackendISCSIScanTargets

2014-03-12 Thread Ján Tomko
Check the iscsiadm output parsing by reading it from a file. --- src/storage/storage_backend_iscsi.c | 2 +- src/storage/storage_backend_iscsipriv.h | 5 ++ tests/storageiscsidata/iscsiadm_sendtargets | 6 +++ tests/storageiscsitest.c| 71

[libvirt] [PATCH 5/7] Add virCommandSetMockOutputFile

2014-03-12 Thread Ján Tomko
After this file is set, all commands executed will be replaced by cat file. This is useful for testing functions that parse output of asynchronous commands. --- src/libvirt_private.syms | 1 + src/util/vircommand.c | 33 + src/util/vircommandpriv.h | 1 + 3

[libvirt] [PATCH 4/7] Introduce vircommandpriv.h for functions used by tests

2014-03-12 Thread Ján Tomko
So far it's just virCommandSetDryRun. --- src/Makefile.am| 2 +- src/util/vircommand.c | 2 +- src/util/vircommand.h | 2 -- src/util/vircommandpriv.h | 28 tests/virkmodtest.c| 2 +-

Re: [libvirt] [PATCH] nwfilter: Add missing goto err_exit in error path

2014-03-12 Thread Ján Tomko
On 03/12/2014 12:38 PM, Stefan Berger wrote: From: Stefan Berger stef...@linux.vnet.ibm.com https://bugzilla.redhat.com/show_bug.cgi?id=1071095 Add a missing goto err_exit in the error path where an unsupported value is assigned to the CTRL_IP_LEARNING key. Signed-off-by: Stefan Berger

[libvirt] [PATCH 2/7] Introduce virStoragePoolSourceDeviceClear

2014-03-12 Thread Ján Tomko
Open-coding one VIR_FREE in the test suite just doesn't seem right. --- src/conf/storage_conf.c | 13 + src/conf/storage_conf.h | 1 + src/libvirt_private.syms | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c

Re: [libvirt] [PATCH 4/7] Introduce vircommandpriv.h for functions used by tests

2014-03-12 Thread Ján Tomko
On 03/12/2014 03:24 PM, Daniel P. Berrange wrote: On Wed, Mar 12, 2014 at 02:08:14PM +0100, Ján Tomko wrote: So far it's just virCommandSetDryRun. --- src/Makefile.am| 2 +- src/util/vircommand.c | 2 +- src/util/vircommand.h | 2 -- src/util

Re: [libvirt] [PATCH 5/7] Add virCommandSetMockOutputFile

2014-03-12 Thread Ján Tomko
On 03/12/2014 03:26 PM, Daniel P. Berrange wrote: On Wed, Mar 12, 2014 at 02:08:15PM +0100, Ján Tomko wrote: After this file is set, all commands executed will be replaced by cat file. I think this is a bit too special case and unecessarily forces use of an external cat command. I think

[libvirt] [PATCH] Fix type mismatch of virNetDev*NetConfig on non-Linux

2014-03-12 Thread Ján Tomko
Commit b4bbaee changed char* to const char*, but omitted the non-Linux version. --- Pushed as a build breaker fix. src/util/virnetdev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 9d8b7cf..55781b2 100644 ---

[libvirt] [PATCHv2 0/2] Fix zero cpu shares handling

2014-03-14 Thread Ján Tomko
Treat 0 as a valid value for cputune shares. v1: https://www.redhat.com/archives/libvir-list/2014-March/msg00215.html v2: squashed the fixup that was sent as a separate patch to the first commit and fixed two more occurences (one of them pointed out by Martin) Ján Tomko (2): Treat zero cpu

[libvirt] [PATCHv2 1/2] Treat zero cpu shares as a valid value

2014-03-14 Thread Ján Tomko
Currently, cputuneshares0/shares/cputune is treated as if it were not specified. Treat is as a valid value if it was explicitly specified and write it to the cgroups. --- src/conf/domain_conf.c | 12 src/conf/domain_conf.h | 1 +

[libvirt] [PATCHv2 2/2] Show the real cpu shares value in live xml

2014-03-14 Thread Ján Tomko
--- src/lxc/lxc_cgroup.c | 13 ++--- src/lxc/lxc_driver.c | 6 +- src/qemu/qemu_cgroup.c | 12 +--- src/qemu/qemu_driver.c | 7 ++- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c index 876c32e..5887b24

Re: [libvirt] [PATCH v2] Fix memory leak in virDomainSnapshotDiskDefClear()

2014-03-17 Thread Ján Tomko
On 03/16/2014 09:39 AM, Nehal J Wani wrote: While running domainsnapshotxml2xmltest, it was found that valgrind pointed out the following memory leak: ==32176== 42 (32 direct, 10 indirect) bytes in 1 blocks are definitely lost in loss record 42 of 66 ==32176==at 0x4A069EE: malloc

Re: [libvirt] [PATCH 4/7] Add ability to register callback for virCommand dry run

2014-03-17 Thread Ján Tomko
On 03/12/2014 02:21 PM, Daniel P. Berrange wrote: To allow for fault injection of the virCommand dry run, add the ability to register a callback. The callback will be passed the argv, env and stdin buffer and is expected to return the exit status and optionally fill stdout and stderr buffers.

[libvirt] [PATCH] Remove double space in file name comment check

2014-03-18 Thread Ján Tomko
Reported by Martin Kletzander --- Pushed as trivial. cfg.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfg.mk b/cfg.mk index a2fed11..e75323e 100644 --- a/cfg.mk +++ b/cfg.mk @@ -888,7 +888,7 @@ sc_prohibit_wrong_filename_in_comment: }

Re: [libvirt] [PATCH] virhostdev.h: remove ATTRIBUTE_NONNULL to oldStateDir

2014-03-19 Thread Ján Tomko
On 03/19/2014 04:17 AM, Chunyan Liu wrote: For libxl driver usage, it didn't support hostdev passthrough before, oldStateDir is NULL when calling virHostdevReAttachDomainHostdevs. That is allowed. Remove ATTRIBUTE_NONNULL setting to oldStateDir. s/to/from/ Signed-off-by: Chunyan Liu

Re: [libvirt] [PATCH v2] Add ability to register callback for virCommand dry run

2014-03-19 Thread Ján Tomko
On 03/18/2014 04:00 PM, Daniel P. Berrange wrote: To allow for fault injection of the virCommand dry run, add the ability to register a callback. The callback will be passed the argv, env and stdin buffer and is expected to return the exit status and optionally fill stdout and stderr buffers.

Re: [libvirt] [PATCH] domiftune: Reword bandwidth clearing paragraph

2014-03-19 Thread Ján Tomko
On 03/19/2014 11:27 AM, Michal Privoznik wrote: s/of value/value of/ Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tools/virsh.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK from me as well. Jan signature.asc Description: OpenPGP digital signature --

[libvirt] [PATCHv2 0/8] Test parsing of iscsiadm output

2014-03-19 Thread Ján Tomko
(and move StorageBackendRunRegex as well) Ján Tomko (8): Sort includes in storage_backend_iscsi.c Move virStorageBackendRun to vircommand Switch virCommandRunRegex to use virStringSplit Don't create iscsiadm command line in ISCSIPool{Start,Stop} Remove storage pool from the arguments

[libvirt] [PATCHv2 1/8] Sort includes in storage_backend_iscsi.c

2014-03-19 Thread Ján Tomko
--- src/storage/storage_backend_iscsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index 2a4e669..0feeb5f 100644 --- a/src/storage/storage_backend_iscsi.c +++

[libvirt] [PATCHv2 3/8] Switch virCommandRunRegex to use virStringSplit

2014-03-19 Thread Ján Tomko
Instead of running the command asynchronously and reading the output via fgets, let virCommand collect the output and split it with virStringSplit. --- src/util/vircommand.c | 41 +++-- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git

[libvirt] [PATCHv2 4/8] Don't create iscsiadm command line in ISCSIPool{Start, Stop}

2014-03-19 Thread Ján Tomko
Create ISCSIConnection{Login,Logout} wrappers for that. --- src/storage/storage_backend_iscsi.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index

[libvirt] [PATCH] Fix virQEMUCapsLoadCache leaks

2014-03-19 Thread Ján Tomko
Valgrind reported leaking of maxCpus and arch strings from virXPathString, as well as the leak of the machineMaxCpus array. Use 'tmp' for the strings we don't want to free, to allow freeing of 'str' in the cleanup label and free machineMaxCpus in virCapsReset too. ---

[libvirt] [PATCHv2 8/8] Add test for virISCSIScanTargets

2014-03-19 Thread Ján Tomko
--- tests/viriscsitest.c | 82 1 file changed, 82 insertions(+) diff --git a/tests/viriscsitest.c b/tests/viriscsitest.c index 0b09834..16a40c7 100644 --- a/tests/viriscsitest.c +++ b/tests/viriscsitest.c @@ -51,6 +51,14 @@ static const char

[libvirt] [PATCHv2 5/8] Remove storage pool from the arguments of a few functions

2014-03-19 Thread Ján Tomko
virStorageBackendISCSISession only needs the path of the source device and virStorageBackendISCSIRescanLUNs doesn't need the pool at all. This will allow the functions to be moved to src/util. --- src/storage/storage_backend_iscsi.c | 18 -- 1 file changed, 12 insertions(+), 6

[libvirt] [PATCHv2 7/8] Add test for virISCSIGetSession

2014-03-19 Thread Ján Tomko
Parse iscsiadm output with and without the recently introduced flashnode info. [1] This should check that commits like 57e17a7 (fixing [2]) do not break iscsiadm output parsing. [1] https://github.com/mikechristie/open-iscsi/commit/181af9a [2] https://bugzilla.redhat.com/show_bug.cgi?id=1067173

[libvirt] [PATCHv2 6/8] Move functions using iscsiadm to viriscsi.c

2014-03-19 Thread Ján Tomko
Remove the 'StorageBackend' from names of the functions and fix indentation. --- po/POTFILES.in | 1 + src/Makefile.am | 1 + src/libvirt_private.syms| 9 + src/storage/storage_backend_iscsi.c | 498 ++--

[libvirt] [PATCHv2 2/8] Move virStorageBackendRun to vircommand

2014-03-19 Thread Ján Tomko
The only storage-specific parameter is the pool object, which is only used for passing to the callback function. --- src/libvirt_private.syms | 2 + src/storage/storage_backend.c | 249 -- src/storage/storage_backend.h | 22 ---

Re: [libvirt] [PATCH] Fix virQEMUCapsLoadCache leaks

2014-03-20 Thread Ján Tomko
On 03/19/2014 06:33 PM, Martin Kletzander wrote: On Wed, Mar 19, 2014 at 05:17:40PM +0100, Ján Tomko wrote: Valgrind reported leaking of maxCpus and arch strings from virXPathString, as well as the leak of the machineMaxCpus array. Use 'tmp' for the strings we don't want to free, to allow

[libvirt] [PATCHv4] Ignore missing files on pool refresh

2014-03-20 Thread Ján Tomko
If we cannot stat/open a file on pool refresh, returning -1 aborts the refresh and the pool is undefined. Don't treat missing files as fatal unless VolOpenCheckMode is called with the VIR_STORAGE_VOL_OPEN_ERROR flag. https://bugzilla.redhat.com/show_bug.cgi?id=977706 --- v1:

[libvirt] [PATCH] Ignore char devices in storage pools by default

2014-03-20 Thread Ján Tomko
Without this, using /dev/mapper as a directory pool fails in virStorageBackendUpdateVolTargetInfoFD: cannot seek to end of file '/dev/mapper/control': Illegal seek Skip over character devices by default. https://bugzilla.redhat.com/show_bug.cgi?id=710866 --- src/storage/storage_backend.h | 1 -

Re: [libvirt] [PATCHv4] Ignore missing files on pool refresh

2014-03-20 Thread Ján Tomko
On 03/20/2014 05:19 PM, Laine Stump wrote: On 03/20/2014 09:57 AM, Ján Tomko wrote: If we cannot stat/open a file on pool refresh, returning -1 aborts the refresh and the pool is undefined. Don't treat missing files as fatal unless VolOpenCheckMode is called

[libvirt] [PATCH] Fix indentation in iscsi storage backend

2014-03-20 Thread Ján Tomko
--- Pushed as trivial. src/storage/storage_backend_iscsi.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index 7e7ffad..fde2b4b 100644 --- a/src/storage/storage_backend_iscsi.c +++

Re: [libvirt] [PATCHv2 8/8] Add test for virISCSIScanTargets

2014-03-20 Thread Ján Tomko
On 03/20/2014 04:01 PM, Daniel P. Berrange wrote: On Wed, Mar 19, 2014 at 04:52:33PM +0100, Ján Tomko wrote: --- tests/viriscsitest.c | 82 1 file changed, 82 insertions(+) diff --git a/tests/viriscsitest.c b/tests/viriscsitest.c index

Re: [libvirt] [PATCHv4] Ignore missing files on pool refresh

2014-03-20 Thread Ján Tomko
On 03/20/2014 05:23 PM, Martin Kletzander wrote: On Thu, Mar 20, 2014 at 04:57:35PM +0100, Ján Tomko wrote: If we cannot stat/open a file on pool refresh, returning -1 aborts the refresh and the pool is undefined. Don't treat missing files as fatal unless VolOpenCheckMode is called

Re: [libvirt] [PATCH] Ignore char devices in storage pools by default

2014-03-20 Thread Ján Tomko
On 03/20/2014 05:45 PM, Eric Blake wrote: On 03/20/2014 10:08 AM, Ján Tomko wrote: Without this, using /dev/mapper as a directory pool fails in virStorageBackendUpdateVolTargetInfoFD: cannot seek to end of file '/dev/mapper/control': Illegal seek Skip over character devices by default. I

[libvirt] [PATCH] Define ISCSIADM unconditionally

2014-03-21 Thread Ján Tomko
Commit 5e1d5dd moved the functions using isciadm to util/viriscsi.c, but ISCSIADM was only defined when the iscsi backend was compiled in. Define it unconditionally to fix the build (and allow testing of viriscsi.c) even if iscsi backend is disabled. --- Pushed as a build breaker fix.

Re: [libvirt] [PATCHv2 8/8] Add test for virISCSIScanTargets

2014-03-21 Thread Ján Tomko
On 03/21/2014 08:04 AM, Roman Bogorodskiy wrote: This breaks the build without iscsi backend: gmake[3]: Entering directory `/usr/home/novel/code/libvirt/src' CC util/libvirt_util_la-viriscsi.lo util/viriscsi.c:83:46: error: use of undeclared identifier 'ISCSIADM' virCommandPtr

[libvirt] [PATCH] Fix typo in configure.ac

2014-03-21 Thread Ján Tomko
s/profram/program/ --- Pushed as trivial. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 85d0dbe..73efffa 100644 --- a/configure.ac +++ b/configure.ac @@ -433,7 +433,7 @@ AC_DEFINE_UNQUOTED([DNSMASQ],[$DNSMASQ],

[libvirt] [PATCH][RFC] Add a rule for indenting labels

2014-03-21 Thread Ján Tomko
Indent labels by one space. Add the rule to HACKING and enforce it by syntax-check. --- Adding a space helps git's function context detection, but the fallout patch is over 800K. My reasoning for also indenting labels in nested code is that vim's cinoptions don't have a separate option for these

[libvirt] [PATCH] Fix build on mingw32

2014-03-21 Thread Ján Tomko
tests/viriscsitest.c:27:12: error: 'EXIT_AM_SKIP' undeclared (first use in this function) --- Pushed as a build breaker fix. tests/viriscsitest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/viriscsitest.c b/tests/viriscsitest.c index 65de954..ebe830a 100644 ---

[libvirt] [PATCH] Add stubs for virDBusCreateReply{,V}

2014-03-21 Thread Ján Tomko
Fix the build without dbus. --- Pushed as a build breaker fix. src/util/virdbus.c | 17 + 1 file changed, 17 insertions(+) diff --git a/src/util/virdbus.c b/src/util/virdbus.c index e7b5a39..cacd604 100644 --- a/src/util/virdbus.c +++ b/src/util/virdbus.c @@ -1672,6 +1672,23 @@

[libvirt] [PATCH 00/24] Indent top-level labels by one space

2014-03-25 Thread Ján Tomko
Change the existing code and introduce a syntax-check rule. Ján Tomko (24): Indent top-level labels by one space in daemon/ Indent top-level labels by one space in examples/ Indent top-level labels by one space in src/conf/ Indent top-level labels by one space in src/cpu/ Indent top

[libvirt] [PATCH 01/24] Indent top-level labels by one space in daemon/

2014-03-25 Thread Ján Tomko
--- daemon/libvirtd-config.c | 6 +- daemon/libvirtd.c| 14 +-- daemon/remote.c | 222 +++ daemon/stream.c | 4 +- 4 files changed, 123 insertions(+), 123 deletions(-) diff --git a/daemon/libvirtd-config.c

[libvirt] [PATCH 02/24] Indent top-level labels by one space in examples/

2014-03-25 Thread Ján Tomko
--- examples/dominfo/info1.c | 2 +- examples/domsuspend/suspend.c| 8 examples/hellolibvirt/hellolibvirt.c | 8 examples/openauth/openauth.c | 10 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/dominfo/info1.c

[libvirt] [PATCH 04/24] Indent top-level labels by one space in src/cpu/

2014-03-25 Thread Ján Tomko
--- src/cpu/cpu.c | 8 src/cpu/cpu_generic.c | 6 +++--- src/cpu/cpu_map.c | 6 +++--- src/cpu/cpu_powerpc.c | 20 ++-- src/cpu/cpu_x86.c | 50 +- 5 files changed, 45 insertions(+), 45 deletions(-) diff

[libvirt] [PATCH 03/24] Indent top-level labels by one space in src/conf/

2014-03-25 Thread Ján Tomko
--- src/conf/capabilities.c | 6 +- src/conf/cpu_conf.c | 12 +- src/conf/device_conf.c | 2 +- src/conf/domain_audit.c | 18 +-- src/conf/domain_conf.c | 222 +-- src/conf/domain_event.c

[libvirt] [PATCH 08/24] Indent top-level labels by one space in src/locking/

2014-03-25 Thread Ján Tomko
--- src/locking/domain_lock.c | 10 +- src/locking/lock_daemon.c | 26 +- src/locking/lock_daemon_config.c | 4 ++-- src/locking/lock_daemon_dispatch.c | 16 src/locking/lock_driver_lockd.c| 18 +-

[libvirt] [PATCH 09/24] Indent top-level labels by one space in src/lxc/

2014-03-25 Thread Ján Tomko
--- src/lxc/lxc_cgroup.c | 16 +++--- src/lxc/lxc_conf.c | 6 +-- src/lxc/lxc_container.c | 42 +++ src/lxc/lxc_controller.c | 54 +-- src/lxc/lxc_driver.c | 136 +++ src/lxc/lxc_fuse.c | 10 ++--

[libvirt] [PATCH 05/24] Indent top-level labels by one space in src/esx/

2014-03-25 Thread Ján Tomko
--- src/esx/esx_driver.c| 110 ++-- src/esx/esx_interface_driver.c | 4 +- src/esx/esx_network_driver.c| 12 ++-- src/esx/esx_storage_backend_iscsi.c | 22 src/esx/esx_storage_backend_vmfs.c | 36 ++--

[libvirt] [PATCH 06/24] Indent top-level labels by one space in src/libxl/

2014-03-25 Thread Ján Tomko
--- src/libxl/libxl_conf.c | 18 +++--- src/libxl/libxl_domain.c | 24 src/libxl/libxl_driver.c | 152 +++ 3 files changed, 97 insertions(+), 97 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index

[libvirt] [PATCH 12/24] Indent top-level labels by one space in src/parallels/

2014-03-25 Thread Ján Tomko
--- src/parallels/parallels_driver.c | 64 ++-- src/parallels/parallels_network.c | 22 ++--- src/parallels/parallels_storage.c | 68 +++ src/parallels/parallels_utils.c | 2 +- 4 files changed, 78 insertions(+), 78

[libvirt] [PATCH 16/24] Indent top-level labels by one space in src/storage/

2014-03-25 Thread Ján Tomko
--- src/storage/storage_backend.c | 20 - src/storage/storage_backend_disk.c | 6 +-- src/storage/storage_backend_fs.c | 16 src/storage/storage_backend_gluster.c | 12 +++--- src/storage/storage_backend_iscsi.c| 12 +++---

[libvirt] [PATCH 10/24] Indent top-level labels by one space in src/network/

2014-03-25 Thread Ján Tomko
--- src/network/bridge_driver.c | 92 +++ src/network/bridge_driver_linux.c | 40 - 2 files changed, 66 insertions(+), 66 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 20930f3..46c0cb0 100644

[libvirt] [PATCH 11/24] Indent top-level labels by one space in src/nwfilter/

2014-03-25 Thread Ján Tomko
--- src/nwfilter/nwfilter_dhcpsnoop.c | 42 +++ src/nwfilter/nwfilter_driver.c| 22 src/nwfilter/nwfilter_ebiptables_driver.c | 36 +- src/nwfilter/nwfilter_gentech_driver.c| 12 -

[libvirt] [PATCH 19/24] Indent top-level labels by one space in src/vbox/

2014-03-25 Thread Ján Tomko
--- src/vbox/vbox_MSCOMGlue.c | 6 +-- src/vbox/vbox_XPCOMCGlue.c | 2 +- src/vbox/vbox_tmpl.c | 106 ++--- 3 files changed, 57 insertions(+), 57 deletions(-) diff --git a/src/vbox/vbox_MSCOMGlue.c b/src/vbox/vbox_MSCOMGlue.c index

[libvirt] [PATCH 14/24] Indent top-level labels by one space in src/remote/

2014-03-25 Thread Ján Tomko
--- src/remote/remote_driver.c | 268 ++--- 1 file changed, 134 insertions(+), 134 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 72545df..ed7dde6 100644 --- a/src/remote/remote_driver.c +++

<    6   7   8   9   10   11   12   13   14   15   >