From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH 1/4] libxl: convert to use LOG() macro
Date: Tue, 15 Sep 2015 16:12:57 +0100 [thread overview]
Message-ID: <55F83579.8070307@citrix.com> (raw)
In-Reply-To: <1442310104-23932-2-git-send-email-wei.liu2@citrix.com>
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.
> @@ -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;
> + }
Alignment.
~Andrew
next prev parent reply other threads:[~2015-09-15 15:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 9:41 [PATCH 0/4] libxl: use LOG() macro where appropriate Wei Liu
2015-09-15 9:41 ` [PATCH 1/4] libxl: convert to use LOG() macro Wei Liu
2015-09-15 15:12 ` Andrew Cooper [this message]
2015-09-15 15:36 ` Wei Liu
2015-09-15 17:01 ` Ian Jackson
2015-09-15 9:41 ` [PATCH 2/4] libxl: fix overly lines and delete extraneous quotes Wei Liu
2015-09-15 9:41 ` [PATCH 3/4] libxl: map LIBXL__LOG_VERBOSE to XTL_VERBOSE Wei Liu
2015-09-15 9:41 ` [PATCH 4/4] libxl: fix places missed by spatch Wei Liu
2015-09-15 14:50 ` [PATCH 0/4] libxl: use LOG() macro where appropriate Ian Jackson
2015-09-15 15:16 ` Ian Campbell
2015-09-15 15:37 ` Wei Liu
2015-09-15 17:01 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55F83579.8070307@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.