|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/4] libxl: convert to use LOG() macro
On Tue, Sep 15, 2015 at 04:12:57PM +0100, Andrew Cooper wrote:
> On 15/09/15 10:41, Wei Liu wrote:
> > @@ -440,15 +436,18 @@ int libxl__domain_rename(libxl__gc *gc, uint32_t
> > domid,
> > if (old_name) {
> > got_old_name = xs_read(ctx->xsh, trans, name_path, &got_old_len);
> > if (!got_old_name) {
> > - LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, errno, "check old
> > name"
> > - " for domain %"PRIu32" allegedly named `%s'",
> > - domid, old_name);
> > + LOGEV(ERROR, errno,
> > + "check old name"" for domain %"PRIu32" allegedly named
> > `%s'",
> > + domid,
> > + old_name);
>
> There are a number of entries like this where the number of lines could
> be reduced.
Urgh, it was generated by spatch. I would certainly rather not going
over all instances for such kind of things -- that voids the point of
using spatch in the first place.
If there is a knob to control spatch to then I would be happy to use it.
Otherwise I will just leave it as it is.
>
> > @@ -669,16 +678,22 @@ int libxl_domain_info(libxl_ctx *ctx, libxl_dominfo
> > *info_r,
> > uint32_t domid) {
> > xc_domaininfo_t xcinfo;
> > int ret;
> > + GC_INIT(ctx);
> >
> > ret = xc_domain_getinfolist(ctx->xch, domid, 1, &xcinfo);
> > if (ret<0) {
> > - LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain info
> > list");
> > + LOGE(ERROR, "getting domain info list");
> > + GC_FREE;
> > return ERROR_FAIL;
> > }
> > - if (ret==0 || xcinfo.domain != domid) return ERROR_DOMAIN_NOTFOUND;
> > + if (ret==0 || xcinfo.domain != domid) {
> > + GC_FREE;
> > + return ERROR_DOMAIN_NOTFOUND;
> > + }
>
Nice catch. Will fix this.
Wei.
> Alignment.
>
> ~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |