mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
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: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
c6f26fc207
commit
8c6b29e7b4
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user