ia64/xen-unstable

changeset 7345:e89a7279d602

Fix compilation problems with xenstore.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Oct 12 09:34:27 2005 +0100 (2005-10-12)
parents 801ffcaa450b
children 1d8933fa01d2
files tools/xenstore/xs_tdb_dump.c tools/xenstore/xsls.c
line diff
     1.1 --- a/tools/xenstore/xs_tdb_dump.c	Wed Oct 12 09:33:03 2005 +0100
     1.2 +++ b/tools/xenstore/xs_tdb_dump.c	Wed Oct 12 09:34:27 2005 +0100
     1.3 @@ -53,17 +53,17 @@ int main(int argc, char *argv[])
     1.4  		hdr = (void *)data.dptr;
     1.5  		if (data.dsize < sizeof(*hdr))
     1.6  			fprintf(stderr, "%.*s: BAD truncated\n",
     1.7 -				key.dsize, key.dptr);
     1.8 +				(int)key.dsize, key.dptr);
     1.9  		else if (data.dsize != total_size(hdr))
    1.10  			fprintf(stderr, "%.*s: BAD length %i for %i/%i/%i (%i)\n",
    1.11 -				key.dsize, key.dptr, data.dsize,
    1.12 +				(int)key.dsize, key.dptr, (int)data.dsize,
    1.13  				hdr->num_perms, hdr->datalen,
    1.14  				hdr->childlen, total_size(hdr));
    1.15  		else {
    1.16  			unsigned int i;
    1.17  			char *p;
    1.18  
    1.19 -			printf("%.*s: ", key.dsize, key.dptr);
    1.20 +			printf("%.*s: ", (int)key.dsize, key.dptr);
    1.21  			for (i = 0; i < hdr->num_perms; i++)
    1.22  				printf("%s%c%i",
    1.23  				       i == 0 ? "" : ",",
     2.1 --- a/tools/xenstore/xsls.c	Wed Oct 12 09:33:03 2005 +0100
     2.2 +++ b/tools/xenstore/xsls.c	Wed Oct 12 09:34:27 2005 +0100
     2.3 @@ -8,7 +8,8 @@ void print_dir(struct xs_handle *h, char
     2.4  {
     2.5      char **e;
     2.6      char newpath[512], *val;
     2.7 -    int num, i, len;
     2.8 +    int i;
     2.9 +    unsigned int num, len;
    2.10  
    2.11      e = xs_directory(h, NULL, path, &num);
    2.12      if (e == NULL)
    2.13 @@ -25,7 +26,7 @@ void print_dir(struct xs_handle *h, char
    2.14          if (val == NULL)
    2.15              printf(":\n");
    2.16          else if ((unsigned)len > (151 - strlen(e[i])))
    2.17 -            printf(" = \"%.*s...\"\n", 148 - strlen(e[i]), val);
    2.18 +            printf(" = \"%.*s...\"\n", (int)(148 - strlen(e[i])), val);
    2.19          else
    2.20              printf(" = \"%s\"\n", val);
    2.21          free(val);