[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Added I/O debugging mode.



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1174864637 -3600
# Node ID ae81e49219a8c2d37861c6a396d02fdda66870d7
# Parent  af87a02594b6cedb4984f9bc0811defd3fb513fa
Added I/O debugging mode.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/libxen/test/test_bindings.c |   12 ++++++++++++
 1 files changed, 12 insertions(+)

diff -r af87a02594b6 -r ae81e49219a8 tools/libxen/test/test_bindings.c
--- a/tools/libxen/test/test_bindings.c Mon Mar 26 00:16:40 2007 +0100
+++ b/tools/libxen/test/test_bindings.c Mon Mar 26 00:17:17 2007 +0100
@@ -34,6 +34,7 @@
 #include "xen_vm.h"
 #include "xen_vm_metrics.h"
 
+//#define PRINT_XML
 
 static void usage()
 {
@@ -71,6 +72,11 @@ write_func(void *ptr, size_t size, size_
 write_func(void *ptr, size_t size, size_t nmemb, xen_comms *comms)
 {
     size_t n = size * nmemb;
+#ifdef PRINT_XML
+    printf("\n\n---Result from server -----------------------\n");
+    printf("%s\n",((char*) ptr));
+    fflush(stdout);
+#endif
     return comms->func(ptr, n, comms->handle) ? n : 0;
 }
 
@@ -80,6 +86,12 @@ call_func(const void *data, size_t len, 
           void *result_handle, xen_result_func result_func)
 {
     (void)user_handle;
+
+#ifdef PRINT_XML
+    printf("\n\n---Data to server: -----------------------\n");
+    printf("%s\n",((char*) data));
+    fflush(stdout);
+#endif
 
     CURL *curl = curl_easy_init();
     if (!curl) {

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.