On Fri, Dec 12, 2014 at 10:32:54AM +0800, Luyao Huang wrote:
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(a)redhat.com>
---
src/conf/domain_conf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 2965d8d..d4ac301 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -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 (def->type == VIR_DOMAIN_CONTROLLER_TYPE_USB &&
--
1.8.3.1
ACK and safe for freeze since this makes the controller disappear.
Will push in a while.
Martin