[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-4.6 v3] libxl: fix libxl__build_hvm error code return path



On Thu, 2015-08-13 at 09:24 +0100, Wei Liu wrote:
> @@ -1002,22 +1005,22 @@ int libxl__build_hvm(libxl__gc *gc, uint32_t
> domid,
>          goto out;
>      }
>  
> -    ret = hvm_build_set_params(ctx->xch, domid, info, state->store_port,

At least this one doesn't return ERROR_*, it returns 0 or -1, assigning
such to rc is wrong and ultimately returning it from this function even
worse.

Remind me why we aren't just taking Roger's original patch from <
1438942688-7610-2-git-send-email-roger.pau@xxxxxxxxxx> ? It seems we are
basically iterating towards it...

> -                               &state->store_mfn, state->console_port,
> -                               &state->console_mfn, state->store_domid,
> -                               state->console_domid);
> -    if (ret) {
> -        LOGEV(ERROR, ret, "hvm build set params failed");
> +    rc = hvm_build_set_params(ctx->xch, domid, info, state->store_port,
> +                              &state->store_mfn, state->console_port,
> +                              &state->console_mfn, state->store_domid,
> +                              state->console_domid);
> +    if (rc) {
> +        LOGEV(ERROR, rc, "hvm build set params failed");
>          goto out;
>      }
>  
> -    ret = hvm_build_set_xs_values(gc, domid, &args);
> -    if (ret) {
> -        LOG(ERROR, "hvm build set xenstore values failed (ret=%d)", 
> ret);
> +    rc = hvm_build_set_xs_values(gc, domid, &args);
> +    if (rc) {
> +        LOG(ERROR, "hvm build set xenstore values failed (rc=%d)", rc);
>          goto out;
>      }
>  
> -    return 0;
> +    rc = 0;
>  out:
>      return rc;
>  }

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.