[PATCH v3 1/3] conf: fix logic error for scsi units

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Introduced in c8007fdc5d2, it should use 'greater than max' instead of
'equal or greater than max' for the condition of checking invalid scsi
unit.

Signed-off-by: Han Han <hhan@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 9580884747..badc2da487 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4850,7 +4850,7 @@ virDomainSCSIDriveAddressIsUsed(const virDomainDef *def,
             break;
         }
 
-        if (max != -1 && addr->unit >= max)
+        if (max != -1 && addr->unit > max)
             return true;
         if (reserved != -1 && addr->unit == reserved)
             return true;
-- 
2.24.0.rc1

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux