conf: goto error when value of max_sectors is too large

Output error when we try to set a too large max_sectors.
Just like queues and cmd_per_lun here.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
(cherry picked from commit ce1d2f63152290098450fa2beecdee79cf929456)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Luyao Huang 2014-12-12 10:32:54 +08:00 committed by Ján Tomko
parent 03f19178ce
commit d109b7ce25

View File

@ -6435,6 +6435,7 @@ virDomainControllerDefParseXML(xmlNodePtr node,
if (max_sectors && virStrToLong_ui(max_sectors, NULL, 10, &def->max_sectors) < 0) {
virReportError(VIR_ERR_XML_ERROR,
_("Malformed 'max_sectors' value %s'"), max_sectors);
goto error;
}
if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0)