1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

add debug messages

This commit is contained in:
Stefan Lankes 2017-02-18 21:58:33 +01:00
parent 91b0c128e8
commit 266247f282

View file

@ -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;
}