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] RE: Please check ia64 patch for core files to be affected

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: Please check ia64 patch for core files to be affected
From: "Magenheimer, Dan (HP Labs Fort Collins)" <dan.magenheimer@xxxxxx>
Date: Thu, 13 Oct 2005 14:59:17 -0700
Delivery-date: Thu, 13 Oct 2005 21:56:38 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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
Thread-index: AcXQM/oWamA0P89OTEqDSf59BtFGmAADLlrw
Thread-topic: Please check ia64 patch for core files to be affected
Here's another couple changes to core files needed
for ia64.  Here, dsize is a size_t so gcc doesn't
allow it to be printf'd by a %i on ia64 where size_t
is 64-bits (and int is 32 bits).  Unless there
are objections (or a better fix suggested), these
will also be included in the next ia64 pull.

Dan

===========

# User tristan.gingold@xxxxxxxx
# Node ID 276744d6f43efc3a2f885d5ade6b9a56733df81c
# Parent  74d56b7ff46cb07fbf7dbb72cad4e14e9d22324f
Modify to be able to compile on ia64.
Width arguments of printf ("%*") should be an int.

diff -r 74d56b7ff46c -r 276744d6f43e tools/xenstore/xs_tdb_dump.c
--- a/tools/xenstore/xs_tdb_dump.c      Tue Oct 11 22:57:44 2005
+++ b/tools/xenstore/xs_tdb_dump.c      Wed Oct 12 12:51:31 2005
@@ -53,17 +53,17 @@
                hdr = (void *)data.dptr;
                if (data.dsize < sizeof(*hdr))
                        fprintf(stderr, "%.*s: BAD truncated\n",
-                               key.dsize, key.dptr);
+                               (int)key.dsize, key.dptr);
                else if (data.dsize != total_size(hdr))
                        fprintf(stderr, "%.*s: BAD length %i for
%i/%i/%i (%i)\n",
-                               key.dsize, key.dptr, data.dsize,
+                               (int)key.dsize, key.dptr,
(int)data.dsize,
                                hdr->num_perms, hdr->datalen,
                                hdr->childlen, total_size(hdr));
                else {
                        unsigned int i;
                        char *p;
 
-                       printf("%.*s: ", key.dsize, key.dptr);
+                       printf("%.*s: ", (int)key.dsize, key.dptr);
                        for (i = 0; i < hdr->num_perms; i++)
                                printf("%s%c%i",
                                       i == 0 ? "" : ",",
diff -r 74d56b7ff46c -r 276744d6f43e tools/xenstore/xsls.c
--- a/tools/xenstore/xsls.c     Tue Oct 11 22:57:44 2005
+++ b/tools/xenstore/xsls.c     Wed Oct 12 12:51:31 2005
@@ -25,7 +25,7 @@
         if (val == NULL)
             printf(":\n");
         else if ((unsigned)len > (151 - strlen(e[i])))
-            printf(" = \"%.*s...\"\n", 148 - strlen(e[i]), val);
+            printf(" = \"%.*s...\"\n", 148 - (int)strlen(e[i]), val);
         else
             printf(" = \"%s\"\n", val);
         free(val);

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>