WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Fix for fs-backend crash when xend was no

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix for fs-backend crash when xend was not started after system boot.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Feb 2010 02:15:19 -0800
Delivery-date: Mon, 22 Feb 2010 02:16:37 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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 <=