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
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");
         }
-------------------------------------------------------------------------
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
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to