|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] Fix for fs-backend crash when xend was no
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1266833181 0
# Node ID 243614f8360c3aac8d73cd59d1cbc2765bf4b53d
# Parent 628600e0e3b426a02602600645b2a74c9a1b4c6e
Fix for fs-backend crash when xend was not started after system boot.
Signed-off-by: Daniel Kiper <dkiper@xxxxxxxxxxxx>
---
tools/fs-back/fs-backend.c | 3 ++-
tools/fs-back/fs-xenbus.c | 7 +++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff -r 628600e0e3b4 -r 243614f8360c tools/fs-back/fs-backend.c
--- a/tools/fs-back/fs-backend.c Mon Feb 22 10:05:40 2010 +0000
+++ b/tools/fs-back/fs-backend.c Mon Feb 22 10:06:21 2010 +0000
@@ -300,7 +300,8 @@ static void await_connections(void)
LIST_INIT (&mount_requests_head);
assert(xsh != NULL);
- fd = xenbus_get_watch_fd();
+ if ((fd = xenbus_get_watch_fd()) == -1)
+ err(1, "xenbus_get_watch_fd: could not setup watch");
/* Infinite watch loop */
do {
FD_ZERO(&fds);
diff -r 628600e0e3b4 -r 243614f8360c tools/fs-back/fs-xenbus.c
--- a/tools/fs-back/fs-xenbus.c Mon Feb 22 10:05:40 2010 +0000
+++ b/tools/fs-back/fs-xenbus.c Mon Feb 22 10:06:21 2010 +0000
@@ -105,11 +105,18 @@ int xenbus_get_watch_fd(void)
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);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] Fix for fs-backend crash when xend was not started after system boot.,
Xen patchbot-unstable <=
|
|
|
|
|