WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] ext2fs-lib.c - 64/32 bit issues

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] ext2fs-lib.c - 64/32 bit issues
From: Ben Thomas <bthomas@xxxxxxxxxxxxxxx>
Date: Thu, 09 Nov 2006 17:54:37 -0500
Delivery-date: Thu, 09 Nov 2006 14:54:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc4 (X11/20060501)
Hi,

This won't compile on a 64 bit system. Another victim of long long
and printf. I haven't noticed anything about it on the mailing list,
so I believe that the attached patch may resolve this.


Signed-off-by: Ben Thomas (ben@xxxxxxxxxxxxxxx)


--
------------------------------------------------------------------------
Ben Thomas                                         Virtual Iron Software
bthomas@xxxxxxxxxxxxxxx                            Tower 1, Floor 2
978-849-1214                                       900 Chelmsford Street
                                                   Lowell, MA 01851
diff -r 452010ddef24 tools/libfsimage/ext2fs-lib/ext2fs-lib.c
--- a/tools/libfsimage/ext2fs-lib/ext2fs-lib.c  Thu Nov 09 18:14:53 2006 +0000
+++ b/tools/libfsimage/ext2fs-lib/ext2fs-lib.c  Thu Nov 09 17:45:07 2006 -0500
@@ -24,6 +24,7 @@
 #include <fsimage_plugin.h>
 #include <ext2fs/ext2fs.h>
 #include <errno.h>
+#include <inttypes.h>
 
 static int
 ext2lib_mount(fsi_t *fsi, const char *name)
@@ -34,7 +35,7 @@ ext2lib_mount(fsi_t *fsi, const char *na
        uint64_t offset = fsip_fs_offset(fsi);
 
        if (offset)
-               snprintf(opts, 29, "offset=%lld", offset);
+               snprintf(opts, 29, "offset=%" PRId64, offset);
 
        fs = malloc(sizeof (*fs));
        if (fs == NULL)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>