mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-05 12:35:20 +00:00
conf: Check for attach disk usage of iothread=0
Since iothreadid = 0 is invalid, we need to check for it when attempting to add a disk; otherwise, someone would think/believe their attempt to add an IOThread to the disk would succeed. Luckily other code ignored things when ->iothread == 0...
This commit is contained in:
parent
e5470dd0e0
commit
cb5d0193aa
@ -7483,7 +7483,8 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (driverIOThread) {
|
if (driverIOThread) {
|
||||||
if (virStrToLong_uip(driverIOThread, NULL, 10, &def->iothread) < 0) {
|
if (virStrToLong_uip(driverIOThread, NULL, 10, &def->iothread) < 0 ||
|
||||||
|
def->iothread == 0) {
|
||||||
virReportError(VIR_ERR_XML_ERROR,
|
virReportError(VIR_ERR_XML_ERROR,
|
||||||
_("Invalid iothread attribute in disk driver "
|
_("Invalid iothread attribute in disk driver "
|
||||||
"element: %s"), driverIOThread);
|
"element: %s"), driverIOThread);
|
||||||
|
Loading…
Reference in New Issue
Block a user