From: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
To: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: [PATCH] Use PRIu64 instead of %lu in monitor.c
Date: Mon, 12 Feb 2007 22:09:08 -0600 [thread overview]
Message-ID: <45D139E4.1090606@codemonkey.ws> (raw)
[-- Attachment #1: Type: text/plain, Size: 172 bytes --]
Howdy,
%lu only works on 64 bit hosts for uint64_t's. The most portable thing
to do is use PRIu64. This is what is done in the rest of QEMU.
Regards,
Anthony Liguori
[-- Attachment #2: monitor-uint64.diff --]
[-- Type: text/x-patch, Size: 2077 bytes --]
diff -r f2e188be2c43 qemu/monitor.c
--- a/qemu/monitor.c Mon Feb 12 22:04:38 2007 -0600
+++ b/qemu/monitor.c Mon Feb 12 22:06:28 2007 -0600
@@ -379,13 +379,15 @@ static void do_io_statistics(const char
case 'a':
term_printf("---------- hda io statistics ----------\n");
io[0] = vmdk_io_statistics(bs_table[0]);
- term_printf("read: %lu \nwrite: %lu \n", io[0].read_byte_counter, io[0].write_byte_counter);
+ term_printf("read: %" PRIu64 " \nwrite: %" PRIu64 " \n",
+ io[0].read_byte_counter, io[0].write_byte_counter);
break;
case 'b':
term_printf("---------- hdb io statistics ----------\n");
if (bs_table[1]) {
io[1] = vmdk_io_statistics(bs_table[1]);
- term_printf("read: %lu \nwrite: %lu \n", io[1].read_byte_counter, io[1].write_byte_counter);
+ term_printf("read: %" PRIu64 " \nwrite: %" PRIu64 " \n",
+ io[1].read_byte_counter, io[1].write_byte_counter);
}else {
term_printf("hdb not exist\n");
}
@@ -394,7 +396,8 @@ static void do_io_statistics(const char
term_printf("---------- hdc io statistics ----------\n");
if (bs_table[2]) {
io[2] = vmdk_io_statistics(bs_table[2]);
- term_printf("read: %lu \nwrite: %lu \n", io[2].read_byte_counter, io[2].write_byte_counter);
+ term_printf("read: %" PRIu64 " \nwrite: %" PRIu64 " \n",
+ io[2].read_byte_counter, io[2].write_byte_counter);
}else {
term_printf("hdc not exist\n");
}
@@ -403,7 +406,8 @@ static void do_io_statistics(const char
term_printf("---------- hdd io statistics ----------\n");
if (bs_table[3]) {
io[3] = vmdk_io_statistics(bs_table[1]);
- term_printf("read: %lu \nwrite: %lu \n", io[3].read_byte_counter, io[3].write_byte_counter);
+ term_printf("read: %" PRIu64 " \nwrite: %" PRIu64 " \n",
+ io[3].read_byte_counter, io[3].write_byte_counter);
}else {
term_printf("hdd not exist\n");
}
[-- Attachment #3: Type: text/plain, Size: 374 bytes --]
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
[-- Attachment #4: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
reply other threads:[~2007-02-13 4:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=45D139E4.1090606@codemonkey.ws \
--to=anthony-rdkfgonbjusknkdkm+me6a@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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.