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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Xen patchbot-unstable
# HG changeset patch
# User Ewan Mellor <[hidden email]>
# Date 1174864637 -3600
# Node ID ae81e49219a8c2d37861c6a396d02fdda66870d7
# Parent  af87a02594b6cedb4984f9bc0811defd3fb513fa
Added I/O debugging mode.

Signed-off-by: Ewan Mellor <[hidden email]>
---
 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
[hidden email]
http://lists.xensource.com/xen-changelog