ia64/xen-unstable

changeset 14549:ae81e49219a8

Added I/O debugging mode.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Mon Mar 26 00:17:17 2007 +0100 (2007-03-26)
parents af87a02594b6
children 90d84e83ad77
files tools/libxen/test/test_bindings.c
line diff
     1.1 --- a/tools/libxen/test/test_bindings.c	Mon Mar 26 00:16:40 2007 +0100
     1.2 +++ b/tools/libxen/test/test_bindings.c	Mon Mar 26 00:17:17 2007 +0100
     1.3 @@ -34,6 +34,7 @@
     1.4  #include "xen_vm.h"
     1.5  #include "xen_vm_metrics.h"
     1.6  
     1.7 +//#define PRINT_XML
     1.8  
     1.9  static void usage()
    1.10  {
    1.11 @@ -71,6 +72,11 @@ static size_t
    1.12  write_func(void *ptr, size_t size, size_t nmemb, xen_comms *comms)
    1.13  {
    1.14      size_t n = size * nmemb;
    1.15 +#ifdef PRINT_XML
    1.16 +    printf("\n\n---Result from server -----------------------\n");
    1.17 +    printf("%s\n",((char*) ptr));
    1.18 +    fflush(stdout);
    1.19 +#endif
    1.20      return comms->func(ptr, n, comms->handle) ? n : 0;
    1.21  }
    1.22  
    1.23 @@ -81,6 +87,12 @@ call_func(const void *data, size_t len, 
    1.24  {
    1.25      (void)user_handle;
    1.26  
    1.27 +#ifdef PRINT_XML
    1.28 +    printf("\n\n---Data to server: -----------------------\n");
    1.29 +    printf("%s\n",((char*) data));
    1.30 +    fflush(stdout);
    1.31 +#endif
    1.32 +
    1.33      CURL *curl = curl_easy_init();
    1.34      if (!curl) {
    1.35          return -1;