mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
nodedev: avoid use of VIR_ERR_NO_* errors internally
These errors are demoted to debug statements[1] since they're only
intended to be used as return values for public APIs. This makes it
difficult to debug the problem when something goes wrong since no error
message is logged. Switch instead to VIR_ERR_INTERNAL_ERROR so that the
error is logged as expected.
[1] See the implementation of daemonErrorLogFilter() for details:
e2f82a3704/src/remote/remote_daemon.c (L89)
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
67ca558f5c
commit
14085ef98d
@ -724,7 +724,7 @@ nodeDeviceGetMdevctlDefineStartCommand(virNodeDeviceDef *def,
|
||||
g_autofree char *parent_addr = nodeDeviceFindAddressByName(def->parent);
|
||||
|
||||
if (!parent_addr) {
|
||||
virReportError(VIR_ERR_NO_NODE_DEVICE,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("unable to find parent device '%s'"), def->parent);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user