From 98e2f910368ab9ee6a0b0881773caf40e4151a91 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Wed, 13 Mar 2019 15:55:23 +0100 Subject: [PATCH] qemu-usb: fix multiple device support bus or device should be different (not both) when comparing a device to already present devices. Because of this the second USB device was marked as existent when the bus matched or the bus did not but the device number. --- repos/libports/src/lib/qemu-usb/host.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/libports/src/lib/qemu-usb/host.cc b/repos/libports/src/lib/qemu-usb/host.cc index a12213359..ad1c02358 100644 --- a/repos/libports/src/lib/qemu-usb/host.cc +++ b/repos/libports/src/lib/qemu-usb/host.cc @@ -190,10 +190,10 @@ struct Dev_info bool operator != (Dev_info const &other) const { if (bus && dev) - return bus != other.bus && dev != other.dev; + return bus != other.bus || dev != other.dev; if (vendor && product) - return vendor != other.vendor && product != other.product; + return vendor != other.vendor || product != other.product; return true; }