[libvirt] [PATCH v2 3/8] bhyve: Replace VIR_ERROR with standard vir*Error in state driver init

Cole Robinson crobinso at redhat.com
Mon May 23 19:44:22 UTC 2016


On 05/23/2016 02:35 PM, Jovanka Gulicoska wrote:
> Replace VIR_ERROR with virReportError
> ---
>  src/bhyve/bhyve_driver.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
> index c58286f..8afa599 100644
> --- a/src/bhyve/bhyve_driver.c
> +++ b/src/bhyve/bhyve_driver.c
> @@ -88,8 +88,8 @@ bhyveAutostartDomain(virDomainObjPtr vm, void *opaque)
>          ret = virBhyveProcessStart(data->conn, data->driver, vm,
>                                     VIR_DOMAIN_RUNNING_BOOTED, 0);
>          if (ret < 0) {
> -            VIR_ERROR(_("Failed to autostart VM '%s': %s"),
> -                      vm->def->name, virGetLastErrorMessage());
> +            virReportError(VIR_ERR_INTERNAL_ERROR, _("Failed to autostart VM '%s': %s"),
> +                           vm->def->name, virGetLastErrorMessage());
>          }
>      }
>      virObjectUnlock(vm);
> 

We generally try to split lines over 80 columns if we can. So I tweaked this to

virReportError(VIR_ERR_INTERNAL_ERROR,
	       _("Failed to autostart VM '%s': %s"),
               vm->def->name, virGetLastErrorMessage());

And pushed

Thanks,
Cole




More information about the libvir-list mailing list