aboutsummaryrefslogtreecommitdiffstats
path: root/tools/fs-back/fs-xenbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/fs-back/fs-xenbus.c')
-rw-r--r--tools/fs-back/fs-xenbus.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/fs-back/fs-xenbus.c b/tools/fs-back/fs-xenbus.c
index e883b661a0..70ddcbbf87 100644
--- a/tools/fs-back/fs-xenbus.c
+++ b/tools/fs-back/fs-xenbus.c
@@ -105,11 +105,18 @@ error_exit:
int xenbus_get_watch_fd(void)
{
int res;
+#if DEBUG
+ int errno_orig;
+#endif
assert(xsh != NULL);
res = xs_watch(xsh, WATCH_NODE, "conn-watch");
if (!res) {
+#if DEBUG
+ errno_orig = errno;
FS_DEBUG("ERROR: xs_watch %s failed ret=%d errno=%d\n",
WATCH_NODE, res, errno);
+ errno = errno_orig;
+#endif
return -1;
}
return xs_fileno(xsh);