From: Tristan Gingold Subject: PATCH: lomount fixes Date: Wed, 2 Aug 2006 10:35:13 +0200 Message-ID: <200608021035.13801.Tristan.Gingold@bull.net> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_BPG0EwUIvawS9MK" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com, Keir Fraser List-Id: xen-devel@lists.xenproject.org --Boundary-00=_BPG0EwUIvawS9MK Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, this patch fixes compilation warnings when DEBUG is defined. Tested by compiling lomount. Tristan. --Boundary-00=_BPG0EwUIvawS9MK Content-Type: text/x-diff; charset="us-ascii"; name="xen-lomount2.diffs" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-lomount2.diffs" # HG changeset patch # User gingold@virtu10 # Node ID 8eb45f399f28877e083985d6cf0c8cf478885ae8 # Parent 4acc6d51f3893d2b0c33c021f459ac12482858d9 Fix printf formats inside #ifdef DEBUG. Signed-off-by: Tristan Gingold diff -r 4acc6d51f389 -r 8eb45f399f28 tools/misc/lomount/lomount.c --- a/tools/misc/lomount/lomount.c Tue Aug 01 14:58:20 2006 -0600 +++ b/tools/misc/lomount/lomount.c Wed Aug 02 08:45:45 2006 +0200 @@ -158,7 +158,7 @@ load_gpt (const char *diskimage, struct entry_size = read_le4 (&data[84]); #ifdef DEBUG - fprintf(stderr, "lba entries: %lu, nbr_part: %u, entry_size: %lu\n", + fprintf(stderr, "lba entries: %llu, nbr_part: %u, entry_size: %lu\n", entries_lba, nbr_part, entry_size); #endif part = malloc (nbr_part * sizeof (struct pentry)); @@ -404,7 +404,7 @@ int main(int argc, char ** argv) value is off by (larger than) a value less than one. */ sec = 512; /* TODO: calculate real sector size */ #ifdef DEBUG - printf("sec: %d\n", sec); + printf("sec: %llu\n", sec); #endif if (partition > nbr_part) { @@ -421,7 +421,7 @@ int main(int argc, char ** argv) pnum = sec * num; #ifdef DEBUG - printf("offset = %d\n", pnum); + printf("offset = %llu\n", pnum); #endif snprintf(buf, sizeof(buf), "mount -oloop,offset=%lld %s %s", pnum, diskimage, argv2); --Boundary-00=_BPG0EwUIvawS9MK Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_BPG0EwUIvawS9MK--