]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: fix logic error for scsi units
authorHan Han <hhan@redhat.com>
Wed, 4 Dec 2019 09:35:37 +0000 (17:35 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 4 Dec 2019 12:20:57 +0000 (13:20 +0100)
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@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c

index 95808847476102dc2057d633e5c1c9870317a9e2..badc2da487fff7a302d5036713261fb484ceb5ef 100644 (file)
@@ -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;