direct-io.hg

changeset 7523:c03dc328bf3a

Modify printfs to be able to compile on ia64.
Width arguments of printf ("%*") should be an int.
author djm@kirby.fc.hp.com
date Thu Oct 13 16:02:35 2005 -0600 (2005-10-13)
parents 760f5e85c706
children 70de2b71f439
files tools/libxc/xc_ia64_stubs.c tools/xenstore/xs_tdb_dump.c tools/xenstore/xsls.c
line diff
     1.1 --- a/tools/libxc/xc_ia64_stubs.c	Thu Oct 13 14:24:45 2005 -0600
     1.2 +++ b/tools/libxc/xc_ia64_stubs.c	Thu Oct 13 16:02:35 2005 -0600
     1.3 @@ -17,17 +17,14 @@ int xc_linux_restore(int xc_handle, int 
     1.4  }
     1.5  
     1.6  int xc_vmx_build(int xc_handle,
     1.7 -                   u32 domid,
     1.8 -                   int memsize,
     1.9 -                   const char *image_name,
    1.10 -                   struct mem_map *mem_mapp,
    1.11 -                   const char *ramdisk_name,
    1.12 -                   const char *cmdline,
    1.13 -                   unsigned int control_evtchn,
    1.14 -                   unsigned long flags,
    1.15 -                   unsigned int vcpus,
    1.16 -                   unsigned int store_evtchn,
    1.17 -                   unsigned long *store_mfn)
    1.18 +                 uint32_t domid,
    1.19 +                 int memsize,
    1.20 +                 const char *image_name,
    1.21 +                 unsigned int control_evtchn,
    1.22 +                 unsigned long flags,
    1.23 +                 unsigned int vcpus,
    1.24 +                 unsigned int store_evtchn,
    1.25 +                 unsigned long *store_mfn)
    1.26  {
    1.27      PERROR("xc_vmx_build not implemented\n");
    1.28      return -1;
     2.1 --- a/tools/xenstore/xs_tdb_dump.c	Thu Oct 13 14:24:45 2005 -0600
     2.2 +++ b/tools/xenstore/xs_tdb_dump.c	Thu Oct 13 16:02:35 2005 -0600
     2.3 @@ -53,17 +53,17 @@ int main(int argc, char *argv[])
     2.4  		hdr = (void *)data.dptr;
     2.5  		if (data.dsize < sizeof(*hdr))
     2.6  			fprintf(stderr, "%.*s: BAD truncated\n",
     2.7 -				key.dsize, key.dptr);
     2.8 +				(int)key.dsize, key.dptr);
     2.9  		else if (data.dsize != total_size(hdr))
    2.10  			fprintf(stderr, "%.*s: BAD length %i for %i/%i/%i (%i)\n",
    2.11 -				key.dsize, key.dptr, data.dsize,
    2.12 +				(int)key.dsize, key.dptr, (int)data.dsize,
    2.13  				hdr->num_perms, hdr->datalen,
    2.14  				hdr->childlen, total_size(hdr));
    2.15  		else {
    2.16  			unsigned int i;
    2.17  			char *p;
    2.18  
    2.19 -			printf("%.*s: ", key.dsize, key.dptr);
    2.20 +			printf("%.*s: ", (int)key.dsize, key.dptr);
    2.21  			for (i = 0; i < hdr->num_perms; i++)
    2.22  				printf("%s%c%i",
    2.23  				       i == 0 ? "" : ",",
     3.1 --- a/tools/xenstore/xsls.c	Thu Oct 13 14:24:45 2005 -0600
     3.2 +++ b/tools/xenstore/xsls.c	Thu Oct 13 16:02:35 2005 -0600
     3.3 @@ -25,7 +25,7 @@ void print_dir(struct xs_handle *h, char
     3.4          if (val == NULL)
     3.5              printf(":\n");
     3.6          else if ((unsigned)len > (151 - strlen(e[i])))
     3.7 -            printf(" = \"%.*s...\"\n", 148 - strlen(e[i]), val);
     3.8 +            printf(" = \"%.*s...\"\n", 148 - (int)strlen(e[i]), val);
     3.9          else
    3.10              printf(" = \"%s\"\n", val);
    3.11          free(val);