提交 8c6b29e7 编写于 作者: J John Ferlan

conf: Provide error on undefined iothreadsched entry

When commit id '6dfb4507' refactored where the iothreadsched data was
stored, the error message for when the virDomainIOThreadIDFind failed
to find an iothreadid ("iothreadsched attribute 'iothreads' uses
undefined iothread ids") was lost. This led to the possibility that
someone would try to use it, but receive the generic message "An error
occurred, but the cause is unknown".

This patch adds the error message back so that someone will know that
they have an invalid configuration.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 c6f26fc2
......@@ -15490,8 +15490,12 @@ virDomainDefGetIOThreadSched(virDomainDefPtr def,
{
virDomainIOThreadIDDefPtr iothrinfo;
if (!(iothrinfo = virDomainIOThreadIDFind(def, iothread)))
if (!(iothrinfo = virDomainIOThreadIDFind(def, iothread))) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Cannot find 'iothread' : %u"),
iothread);
return NULL;
}
return &iothrinfo->sched;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册