From 266247f28225b65af7398ccfa81ed3a2cce0d7ab Mon Sep 17 00:00:00 2001
From: Stefan Lankes <slankes@eonerc.rwth-aachen.de>
Date: Sat, 18 Feb 2017 21:58:33 +0100
Subject: [PATCH] add debug messages

---
 tools/proxy.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/proxy.c b/tools/proxy.c
index 93aa3ecd9..6d6b0c930 100644
--- a/tools/proxy.c
+++ b/tools/proxy.c
@@ -60,6 +60,12 @@
 #define EVENT_SIZE	(sizeof (struct inotify_event))
 #define BUF_LEN		(1024 * (EVENT_SIZE + 16))
 
+#if 1
+#define PROXY_DEBUG(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__);
+#else
+#define PROXY_DEBUG(fmt, ...) {}
+#endif
+
 static int sobufsize = 131072;
 static unsigned int isle_nr = 0;
 static unsigned int qemu = 0;
@@ -394,6 +400,8 @@ static int init_qemu(char *path)
 		exit(1);
 	}
 
+	PROXY_DEBUG("Create VM with pid %d\n", id);
+
 	// move the parent process to the end of the queue
 	// => child would be scheduled next
 	sched_yield();
@@ -401,6 +409,8 @@ static int init_qemu(char *path)
 	// wait until HermitCore is sucessfully booted
 	wait_hermit_available();
 
+	PROXY_DEBUG("VM is available\n");
+
 	return 0;
 }