[libvirt] [PATCH v4] node_device: Replace VIR_ERROR with standard vir*Error in state driver init
Cole Robinson
crobinso at redhat.com
Wed Jun 8 14:19:24 UTC 2016
On 06/08/2016 09:20 AM, Jovanka Gulicoska wrote:
> ---
> src/node_device/node_device_hal.c | 27 ++++++++++++++++++---------
> 1 file changed, 18 insertions(+), 9 deletions(-)
>
> diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_device_hal.c
> index 6ddfad0..2718706 100644
> --- a/src/node_device/node_device_hal.c
> +++ b/src/node_device/node_device_hal.c
> @@ -641,24 +641,29 @@ nodeStateInitialize(bool privileged ATTRIBUTE_UNUSED,
>
> dbus_error_init(&err);
> if (!(sysbus = virDBusGetSystemBus())) {
> - VIR_ERROR(_("DBus not available, disabling HAL driver: %s"),
> - virGetLastErrorMessage());
> + virReportError(VIR_ERR_INTERNAL_ERROR,
> + _("DBus not available, disabling HAL driver: %s"),
> + virGetLastErrorMessage());
> ret = 0;
> goto failure;
> }
>
> hal_ctx = libhal_ctx_new();
> if (hal_ctx == NULL) {
> - VIR_ERROR(_("libhal_ctx_new returned NULL"));
> + virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> + _("libhal_ctx_new returned NULL"));
> goto failure;
> }
>
> if (!libhal_ctx_set_dbus_connection(hal_ctx, sysbus)) {
> - VIR_ERROR(_("libhal_ctx_set_dbus_connection failed"));
> + virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> + _("libhal_ctx_set_dbus_connection failed"));
> goto failure;
> }
> if (!libhal_ctx_init(hal_ctx, &err)) {
> - VIR_ERROR(_("libhal_ctx_init failed, haldaemon is probably not running"));
> + virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> + _("libhal_ctx_init failed, haldaemon is probably "
> + "not running"));
I tweaked the indentation here to line up the quotes, and pushed now. Thanks!
- Cole
More information about the libvir-list
mailing list