From: Han Han Date: Wed, 4 Dec 2019 09:35:37 +0000 (+0800) Subject: conf: fix logic error for scsi units X-Git-Tag: v6.0.0-rc1~515 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e37372291125f8253eedf06be6d56263180436a;p=thirdparty%2Flibvirt.git conf: fix logic error for scsi units 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 Reviewed-by: Michal Privoznik --- 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;