xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH v2 2/4] libxl: fix long lines and delete extraneous quotes
Date: Fri, 2 Oct 2015 15:56:39 +0100	[thread overview]
Message-ID: <1443797801-27332-3-git-send-email-wei.liu2@citrix.com> (raw)
In-Reply-To: <1443797801-27332-1-git-send-email-wei.liu2@citrix.com>

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/libxl/libxl.c       | 21 +++++++++++++--------
 tools/libxl/libxl_utils.c |  8 ++++++--
 2 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 1b754c8..ca725a9 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -420,14 +420,14 @@ int libxl__domain_rename(libxl__gc *gc, uint32_t domid,
         if (rc == ERROR_INVAL) {
             /* no such domain, good */
         } else if (rc != 0) {
-            LOG(ERROR, "unexpected error""checking for existing domain");
+            LOG(ERROR, "unexpected error checking for existing domain");
             goto x_rc;
         } else if (domid_e == domid) {
             /* domain already has this name, ok (but we do still
              * need the rest of the code as we may need to check
              * old_name, for example). */
         } else {
-            LOG(ERROR, "domain with name \"%s\""" already exists.", new_name);
+            LOG(ERROR, "domain with name \"%s\" already exists.", new_name);
             rc = ERROR_INVAL;
             goto x_rc;
         }
@@ -437,14 +437,15 @@ int libxl__domain_rename(libxl__gc *gc, uint32_t domid,
         got_old_name = xs_read(ctx->xsh, trans, name_path, &got_old_len);
         if (!got_old_name) {
             LOGEV(ERROR, errno,
-                  "check old name"" for domain %"PRIu32" allegedly named `%s'",
+                  "check old name for domain %"PRIu32" allegedly named `%s'",
                   domid,
                   old_name);
             goto x_fail;
         }
         if (strcmp(old_name, got_old_name)) {
             LOG(ERROR,
-                "domain %"PRIu32" allegedly named ""`%s' is actually named `%s' - racing ?",
+                "domain %"PRIu32" allegedly named "
+                "`%s' is actually named `%s' - racing ?",
                 domid,
                 old_name,
                 got_old_name);
@@ -456,7 +457,8 @@ int libxl__domain_rename(libxl__gc *gc, uint32_t domid,
     if (!xs_write(ctx->xsh, trans, name_path,
                   new_name, strlen(new_name))) {
         LOG(ERROR,
-            "failed to write new name `%s'"" for domain %"PRIu32" previously named `%s'",
+            "failed to write new name `%s'"
+            " for domain %"PRIu32" previously named `%s'",
             new_name,
             domid,
             old_name);
@@ -489,14 +491,16 @@ int libxl__domain_rename(libxl__gc *gc, uint32_t domid,
             trans = our_trans = 0;
             if (errno != EAGAIN) {
                 LOG(ERROR,
-                    "failed to commit new name `%s'"" for domain %"PRIu32" previously named `%s'",
+                    "failed to commit new name `%s'"
+                    " for domain %"PRIu32" previously named `%s'",
                     new_name,
                     domid,
                     old_name);
                 goto x_fail;
             }
             LOG(DEBUG,
-                "need to retry rename transaction"" for domain %"PRIu32" (name_path=\"%s\", new_name=\"%s\")",
+                "need to retry rename transaction"
+                " for domain %"PRIu32" (name_path=\"%s\", new_name=\"%s\")",
                 domid,
                 name_path,
                 new_name);
@@ -4802,7 +4806,8 @@ retry_transaction:
         new_target_memkb = target_memkb - videoram;
     if (new_target_memkb > memorykb) {
         LOG(ERROR,
-            "memory_dynamic_max must be less than or equal to"" memory_static_max\n");
+            "memory_dynamic_max must be less than or equal to"
+            " memory_static_max\n");
         abort_transaction = 1;
         goto out;
     }
diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c
index 2eba584..e42422a 100644
--- a/tools/libxl/libxl_utils.c
+++ b/tools/libxl/libxl_utils.c
@@ -409,13 +409,17 @@ int libxl_read_file_contents(libxl_ctx *ctx, const char *filename,
           if (got == -1) {                                                \
               if (errno == EINTR) continue;                               \
               if (!ctx) { GC_FREE; return errno; }                        \
-              LOGE(ERROR, "failed to "#rw" %s%s%s", what ? what : "", what ? " from " : "", source);       \
+              LOGE(ERROR, "failed to "#rw" %s%s%s",                       \
+                   what ? what : "", what ? " from " : "", source);       \
               GC_FREE;                                                    \
               return errno;                                               \
           }                                                               \
           if (got == 0) {                                                 \
               if (!ctx) { GC_FREE; return  EPROTO; }                      \
-              LOG(ERROR, zero_is_eof ? "file/stream truncated reading %s%s%s" : "file/stream write returned 0! writing %s%s%s", what ? what : "", what ? " from " : "", source);             \
+              LOG(ERROR, zero_is_eof                                      \
+                  ? "file/stream truncated reading %s%s%s"                \
+                  : "file/stream write returned 0! writing %s%s%s",       \
+                  what ? what : "", what ? " from " : "", source);        \
               GC_FREE;                                                    \
               return EPROTO;                                              \
           }                                                               \
-- 
2.1.4

  parent reply	other threads:[~2015-10-02 14:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 14:56 [PATCH v2 0/4] libxl: use LOG() macro where appropriate Wei Liu
2015-10-02 14:56 ` [PATCH v2 1/4] libxl: convert to use LOG() macro Wei Liu
2015-10-02 14:56 ` Wei Liu [this message]
2015-10-02 14:56 ` [PATCH v2 3/4] libxl: map LIBXL__LOG_VERBOSE to XTL_VERBOSE Wei Liu
2015-10-02 14:56 ` [PATCH v2 4/4] libxl: fix places missed by spatch Wei Liu
2015-10-07 11:52 ` [PATCH v2 0/4] libxl: use LOG() macro where appropriate Ian Campbell

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=1443797801-27332-3-git-send-email-wei.liu2@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=ian.campbell@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).