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>
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)