Changeset
src/conf/domain_conf.h         | 3 +--
src/qemu/qemu_domain_address.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
Git apply log
Switched to a new branch 'cover.1520934238.git.jtomko@redhat.com'
Applying: Adjust whitespace in virDomainDefHasUSB prototype
Using index info to reconstruct a base tree...
M	src/conf/domain_conf.h
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: qemuDomainUSBAddressAddHubs: use numeric comparison
Using index info to reconstruct a base tree...
M	src/qemu/qemu_domain_address.c
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
To https://github.com/patchew-project/libvirt
 * [new tag]         patchew/cover.1520934238.git.jtomko@redhat.com -> patchew/cover.1520934238.git.jtomko@redhat.com
Test passed: syntax-check

loading

[libvirt] [PATCH 0/2] [pushed] Trivial followup fixes for a trivial patch
Posted by Ján Tomko, 14 weeks ago
I managed to push commit 1cdc9ece without incorporating Andrea's
review feedback.

These are the follow-up fixes I pushed as trivial before the commit
police gets me.

Ján Tomko (2):
  Adjust whitespace in virDomainDefHasUSB prototype
  qemuDomainUSBAddressAddHubs: use numeric comparison

 src/conf/domain_conf.h         | 3 +--
 src/qemu/qemu_domain_address.c | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

-- 
2.13.6

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 1/2] Adjust whitespace in virDomainDefHasUSB prototype
Posted by Ján Tomko, 14 weeks ago
To match the rest of the file.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
 src/conf/domain_conf.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 5859c8f4b..337ce7942 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2700,8 +2700,7 @@ int virDomainDefPostParse(virDomainDefPtr def,
                           unsigned int parseFlags,
                           virDomainXMLOptionPtr xmlopt,
                           void *parseOpaque);
-bool
-virDomainDefHasUSB(const virDomainDef *def);
+bool virDomainDefHasUSB(const virDomainDef *def);
 
 int virDomainDeviceValidateAliasForHotplug(virDomainObjPtr vm,
                                            virDomainDeviceDefPtr dev,
-- 
2.13.6

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH 2/2] qemuDomainUSBAddressAddHubs: use numeric comparison
Posted by Ján Tomko, 14 weeks ago
Since data.count is not a pointer, but an integer,
compare it against an integer value instead of using
the implicit "boolean" conversion that is customarily
used for pointers.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
 src/qemu/qemu_domain_address.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 3fcb36add..5f4e8edd2 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -2701,7 +2701,7 @@ qemuDomainUSBAddressAddHubs(virDomainDefPtr def)
                                               &data,
                                               false));
 
-    if (data.count && !virDomainDefHasUSB(def)) {
+    if (data.count > 0 && !virDomainDefHasUSB(def)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                        _("USB is disabled for this domain, but USB devices "
                          "are present in the domain XML"));
-- 
2.13.6

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list