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>
This commit is contained in:
Luyao Huang 2014-12-12 10:32:54 +08:00 committed by Martin Kletzander
parent 15abebdecb
commit ce1d2f6315

View File

@ -6681,6 +6681,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)