From: TeLeMan <geleman@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] use "%lld" instead of "%I64d" for qobject_from_jsonf in monitor.c and migration.c
Date: Mon, 8 Feb 2010 15:27:29 +0800 [thread overview]
Message-ID: <a38b25541002072327ve3fb154t2bce9e9f81231ae6@mail.gmail.com> (raw)
The json parser does not support "%I64d", so we have to use "%lld"
instead of "%I64d".
Signed-off-by: TeLeMan <geleman@gmail.com>
---
migration.c | 6 +++---
monitor.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/migration.c b/migration.c
index f20315f..f44b857 100644
--- a/migration.c
+++ b/migration.c
@@ -180,9 +180,9 @@ static void migrate_put_status(QDict *qdict, const
char *name,
{
QObject *obj;
- obj = qobject_from_jsonf("{ 'transferred': %" PRId64 ", "
- "'remaining': %" PRId64 ", "
- "'total': %" PRId64 " }", trans, rem, total);
+ obj = qobject_from_jsonf("{ 'transferred': %lld, "
+ "'remaining': %lld, "
+ "'total': %lld }", trans, rem, total);
assert(obj != NULL);
qdict_put_obj(qdict, name, obj);
diff --git a/monitor.c b/monitor.c
index a86454b..1738d2a 100644
--- a/monitor.c
+++ b/monitor.c
@@ -342,8 +342,8 @@ static void timestamp_put(QDict *qdict)
if (err < 0)
return;
- obj = qobject_from_jsonf("{ 'seconds': %" PRId64 ", "
- "'microseconds': %" PRId64 " }",
+ obj = qobject_from_jsonf("{ 'seconds': %lld, "
+ "'microseconds': %lld }",
(int64_t) tv.tv_sec, (int64_t) tv.tv_usec);
assert(obj != NULL);
--
1.6.5.1.1367.gcd48
--
SUN OF A BEACH
next reply other threads:[~2010-02-08 7:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-08 7:27 TeLeMan [this message]
2010-02-08 7:42 ` [Qemu-devel] [PATCH] use "%lld" instead of "%I64d" for qobject_from_jsonf in monitor.c and migration.c Roy Tam
2010-02-08 12:03 ` Luiz Capitulino
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=a38b25541002072327ve3fb154t2bce9e9f81231ae6@mail.gmail.com \
--to=geleman@gmail.com \
--cc=qemu-devel@nongnu.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).