direct-io.hg

changeset 11004:c8870f1aa5ca

[TOOLS] use standard DPRINTF macro in PPC builder
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Hollis Blanchard <hollisb@us.ibm.com>
date Wed Aug 02 13:56:41 2006 -0500 (2006-08-02)
parents 3c361a48697f
children 9d5d7d8b7125
files tools/libxc/xc_ppc_linux_build.c
line diff
     1.1 --- a/tools/libxc/xc_ppc_linux_build.c	Wed Aug 02 13:49:50 2006 -0500
     1.2 +++ b/tools/libxc/xc_ppc_linux_build.c	Wed Aug 02 13:56:41 2006 -0500
     1.3 @@ -37,11 +37,6 @@
     1.4  #define MEMSIZE (64UL << 20)
     1.5  #define INITRD_ADDR (24UL << 20)
     1.6  
     1.7 -int verbose;
     1.8 -#define VERBOSE(stuff, ...) \
     1.9 -    if (verbose) \
    1.10 -        stuff __VA_ARGS__;
    1.11 -
    1.12  #define ALIGN_UP(addr,size) (((addr)+((size)-1))&(~((size)-1)))
    1.13  
    1.14  #define max(x,y) ({ \
    1.15 @@ -56,7 +51,7 @@ static void *load_file(const char *path,
    1.16      ssize_t size;
    1.17      int fd;
    1.18  
    1.19 -    VERBOSE(printf("load_file(%s)\n", path));
    1.20 +    DPRINTF("load_file(%s)\n", path);
    1.21  
    1.22      fd = open(path, O_RDONLY);
    1.23      if (fd < 0) {
    1.24 @@ -114,7 +109,7 @@ static int init_boot_vcpu(
    1.25       * we must make sure this register is 0 */
    1.26      ctxt.user_regs.gprs[13] = 0;
    1.27  
    1.28 -    VERBOSE(printf("xc_vcpu_setvcpucontext:\n"
    1.29 +    DPRINTF("xc_vcpu_setvcpucontext:\n"
    1.30                   "  pc 0x%"PRIx64", msr 0x016%"PRIx64"\n"
    1.31                   "  r1-5 %016"PRIx64" %016"PRIx64" %016"PRIx64" %016"PRIx64
    1.32                   " %016"PRIx64"\n",
    1.33 @@ -123,7 +118,7 @@ static int init_boot_vcpu(
    1.34                   ctxt.user_regs.gprs[2],
    1.35                   ctxt.user_regs.gprs[3],
    1.36                   ctxt.user_regs.gprs[4],
    1.37 -                 ctxt.user_regs.gprs[5]));
    1.38 +                 ctxt.user_regs.gprs[5]);
    1.39      rc = xc_vcpu_setcontext(xc_handle, domid, 0, &ctxt);
    1.40      if (rc < 0)
    1.41          perror("setdomaininfo");
    1.42 @@ -181,8 +176,7 @@ static int load_dtb(
    1.43          goto out;
    1.44      }
    1.45  
    1.46 -    VERBOSE(printf("copying device tree to 0x%lx[0x%lx]\n",
    1.47 -            dtb_addr, dtb_size));
    1.48 +    DPRINTF("copying device tree to 0x%lx[0x%lx]\n", dtb_addr, dtb_size);
    1.49      rc = install_image(xc_handle, domid, page_array, img, dtb_addr, dtb_size);
    1.50  
    1.51  out:
    1.52 @@ -241,7 +235,7 @@ static int load_kernel(
    1.53  
    1.54      hack_kernel_img(kernel_img);
    1.55  
    1.56 -    VERBOSE(printf("probe_elf\n"));
    1.57 +    DPRINTF("probe_elf\n");
    1.58      rc = probe_elf(kernel_img, kernel_size, &load_funcs);
    1.59      if (rc < 0) {
    1.60          rc = -1;
    1.61 @@ -249,22 +243,22 @@ static int load_kernel(
    1.62          goto out;
    1.63      }
    1.64  
    1.65 -    VERBOSE(printf("parseimage\n"));
    1.66 +    DPRINTF("parseimage\n");
    1.67      rc = (load_funcs.parseimage)(kernel_img, kernel_size, dsi);
    1.68      if (rc < 0) {
    1.69          rc = -1;
    1.70          goto out;
    1.71      }
    1.72  
    1.73 -    VERBOSE(printf("loadimage\n"));
    1.74 +    DPRINTF("loadimage\n");
    1.75      (load_funcs.loadimage)(kernel_img, kernel_size, xc_handle, domid,
    1.76              page_array, dsi);
    1.77  
    1.78 -    VERBOSE(printf("  v_start     %016"PRIx64"\n", dsi->v_start));
    1.79 -    VERBOSE(printf("  v_end       %016"PRIx64"\n", dsi->v_end));
    1.80 -    VERBOSE(printf("  v_kernstart %016"PRIx64"\n", dsi->v_kernstart));
    1.81 -    VERBOSE(printf("  v_kernend   %016"PRIx64"\n", dsi->v_kernend));
    1.82 -    VERBOSE(printf("  v_kernentry %016"PRIx64"\n", dsi->v_kernentry));
    1.83 +    DPRINTF("  v_start     %016"PRIx64"\n", dsi->v_start);
    1.84 +    DPRINTF("  v_end       %016"PRIx64"\n", dsi->v_end);
    1.85 +    DPRINTF("  v_kernstart %016"PRIx64"\n", dsi->v_kernstart);
    1.86 +    DPRINTF("  v_kernend   %016"PRIx64"\n", dsi->v_kernend);
    1.87 +    DPRINTF("  v_kernentry %016"PRIx64"\n", dsi->v_kernentry);
    1.88  
    1.89  out:
    1.90      free(kernel_img);
    1.91 @@ -287,7 +281,7 @@ static int load_initrd(
    1.92      if (initrd_img == NULL)
    1.93          return -1;
    1.94  
    1.95 -    VERBOSE(printf("copying initrd to 0x%lx[0x%lx]\n", INITRD_ADDR, *len));
    1.96 +    DPRINTF("copying initrd to 0x%lx[0x%lx]\n", INITRD_ADDR, *len);
    1.97      if (install_image(xc_handle, domid, page_array, initrd_img, INITRD_ADDR,
    1.98                  *len))
    1.99          goto out;
   1.100 @@ -326,9 +320,9 @@ static int get_page_array(int xc_handle,
   1.101      int nr_pages;
   1.102      int rc;
   1.103  
   1.104 -    VERBOSE(printf("xc_get_tot_pages\n"));
   1.105 +    DPRINTF("xc_get_tot_pages\n");
   1.106      nr_pages = xc_get_tot_pages(xc_handle, domid);
   1.107 -    VERBOSE(printf("  0x%x\n", nr_pages));
   1.108 +    DPRINTF("  0x%x\n", nr_pages);
   1.109  
   1.110      *page_array = malloc(nr_pages * sizeof(xen_pfn_t));
   1.111      if (*page_array == NULL) {
   1.112 @@ -336,7 +330,7 @@ static int get_page_array(int xc_handle,
   1.113          return -1;
   1.114      }
   1.115  
   1.116 -    VERBOSE(printf("xc_get_pfn_list\n"));
   1.117 +    DPRINTF("xc_get_pfn_list\n");
   1.118      rc = xc_get_pfn_list(xc_handle, domid, *page_array, nr_pages);
   1.119      if (rc != nr_pages) {
   1.120          perror("Could not get the page frame list");