ext2fs-lib.c - 64/32 bit issues
PATCH 1/1 ext2fs-lib.c - 64/32 bit issues
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 ([email protected])
Signature · 5 lines
------------------------------------------------------------------------ Ben Thomas Virtual Iron Software [email protected] Tower 1, Floor 2 978-849-1214 900 Chelmsford Street Lowell, MA 01851
tools/libfsimage/ext2fs-lib/ext2fs-lib.c +2 -1
@@ -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 *nauint64_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
[email protected]
http://lists.xensource.com/xen-devel
Quoted 3 lines · Ben Thomas
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.
Thanks Ben, looks good to me. Sorry for not testing this case...
regards
john