xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH] libxl: Fix up some incorrect printf formats
Date: Thu, 27 May 2010 16:55:16 +0100	[thread overview]
Message-ID: <1274975721-3777-10-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1274975721-3777-9-git-send-email-ian.jackson@eu.citrix.com>

We need to use PRIu32 for domids, and also to pass arguments in the
right order.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/libxl/libxl.c        |    4 ++--
 tools/libxl/libxl_dom.c    |    2 +-
 tools/libxl/libxl_xshelp.c |    3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 8fd4481..6adb9e5 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -230,7 +230,7 @@ int libxl_domain_rename(struct libxl_ctx *ctx, uint32_t domid,
                   new_name, strlen(new_name))) {
         XL_LOG(ctx, XL_LOG_ERROR, "failed to write new name `%s'"
                " for domain %"PRIu32" previously named `%s'",
-               domid, new_name, old_name);
+               new_name, domid, old_name);
         goto x_fail;
     }
 
@@ -240,7 +240,7 @@ int libxl_domain_rename(struct libxl_ctx *ctx, uint32_t domid,
             if (errno != EAGAIN) {
                 XL_LOG(ctx, XL_LOG_ERROR, "failed to commit new name `%s'"
                        " for domain %"PRIu32" previously named `%s'",
-                       domid, new_name, old_name);
+                       new_name, domid, old_name);
                 goto x_fail;
             }
             XL_LOG(ctx, XL_LOG_DEBUG, "need to retry rename transaction"
diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index 483a928..ba7dfe0 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -386,7 +386,7 @@ static const char *userdata_path(struct libxl_ctx *ctx, uint32_t domid,
     rc = libxl_domain_info(ctx, &info, domid);
     if (rc) {
         XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "unable to find domain info"
-                     " for domain %l"PRIu32, domid);
+                     " for domain %"PRIu32, domid);
         return 0;
     }
     uuid_string = string_of_uuid(ctx, info.uuid);
diff --git a/tools/libxl/libxl_xshelp.c b/tools/libxl/libxl_xshelp.c
index 16e8c84..b5c6dbf 100644
--- a/tools/libxl/libxl_xshelp.c
+++ b/tools/libxl/libxl_xshelp.c
@@ -19,6 +19,7 @@
 #include <stddef.h>
 #include <stdio.h>
 #include <stdarg.h>
+#include <inttypes.h>
 
 #include "libxl.h"
 #include "libxl_internal.h"
@@ -119,7 +120,7 @@ char *libxl_xs_get_dompath(struct libxl_ctx *ctx, uint32_t domid)
 {
     char *s = xs_get_domain_path(ctx->xsh, domid);
     if (!s) {
-        XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "failed to get dompath for %lu",
+        XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "failed to get dompath for %" PRIu32,
                      domid);
         return NULL;
     }
-- 
1.5.6.5

  reply	other threads:[~2010-05-27 15:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 15:55 [PATCH 00/14] Logging cleanups, libxc API change Ian Jackson
2010-05-27 15:55 ` [PATCH] xl: Combine headers into one header file Ian Jackson
2010-05-27 15:55   ` [PATCH] xl: Move "extern" declarations to xl.h Ian Jackson
2010-05-27 15:55     ` [PATCH] stubdom/newlib: Provide correct names for time.h timezone variables Ian Jackson
2010-05-27 15:55       ` [PATCH] libxc: xc_domain_save.c: rename "write_exact" macro Ian Jackson
2010-05-27 15:55         ` [PATCH] libelf: Tidy up logging and remove dependency on stdio Ian Jackson
2010-05-27 15:55           ` [PATCH] xtl: New xentoollog mini-library Ian Jackson
2010-05-27 15:55             ` [PATCH] libxc: eliminate static variables, use xentoollog; API change Ian Jackson
2010-05-27 15:55               ` [PATCH] libxc: Use new DBGPRINTF for a few debugging output messages Ian Jackson
2010-05-27 15:55                 ` Ian Jackson [this message]
2010-05-27 15:55                   ` [PATCH] libxl: Use the caller's logger (xentoollog) Ian Jackson
2010-05-27 15:55                     ` [PATCH] xl: Allow control of logging level Ian Jackson
2010-05-27 15:55                       ` [PATCH] libxc: save/restore error handling fixes Ian Jackson
2010-05-27 15:55                         ` [PATCH] libxc: remove \n from strings passed to PERROR Ian Jackson
2010-05-27 15:55                           ` [PATCH] xl/libxtl: Remove glitch in xl migrate log output Ian Jackson
2010-05-27 15:58 ` [PATCH 00/14] Logging cleanups, libxc API change 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=1274975721-3777-10-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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).