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] hotplug: ignore xenstore-read error

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hotplug: ignore xenstore-read error
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 16 Feb 2010 04:00:25 -0800
Delivery-date: Tue, 16 Feb 2010 04:08:20 -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 1266312519 0
# Node ID 4a4caf3c052d4eefa670c193fa264846da49b67e
# Parent  ae2b7f1c89c8b29fedfe8f4561a6d8f5efef7278
hotplug: ignore xenstore-read error

The failure to read "backend/tap/<domid>/*" in the xenstore is a usual
case since the domain is gone after xenstore-ls command is executed.
The error should be ignored.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
---
 tools/hotplug/Linux/blktap |    4 ++--
 tools/hotplug/Linux/block  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff -r ae2b7f1c89c8 -r 4a4caf3c052d tools/hotplug/Linux/blktap
--- a/tools/hotplug/Linux/blktap        Tue Feb 16 09:27:45 2010 +0000
+++ b/tools/hotplug/Linux/blktap        Tue Feb 16 09:28:39 2010 +0000
@@ -23,7 +23,7 @@ check_blktap_sharing()
     do
         for dev in $(xenstore-list "$base_path/$dom")
         do
-            params=$(xenstore_read "$base_path/$dom/$dev/params" | cut -d: -f2)
+            params=$(xenstore_read_default "$base_path/$dom/$dev/params" "" | 
cut -d: -f2)
             if [ "$file" = "$params" ]
             then
 
@@ -35,7 +35,7 @@ check_blktap_sharing()
                         return
                     fi
                 else 
-                    local m=$(xenstore_read "$base_path/$dom/$dev/mode")
+                    local m=$(xenstore_read_default 
"$base_path/$dom/$dev/mode" "")
                     m=$(canonicalise_mode "$m")
 
                     if [ "$m" = 'w' ] 
diff -r ae2b7f1c89c8 -r 4a4caf3c052d tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block Tue Feb 16 09:27:45 2010 +0000
+++ b/tools/hotplug/Linux/block Tue Feb 16 09:28:39 2010 +0000
@@ -100,7 +100,7 @@ check_sharing()
             return
           fi
         else
-          local m=$(xenstore_read "$base_path/$dom/$dev/mode")
+          local m=$(xenstore_read_default "$base_path/$dom/$dev/mode" "")
           m=$(canonicalise_mode "$m")
 
           if [ "$m" = 'w' ]

_______________________________________________
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] hotplug: ignore xenstore-read error, Xen patchbot-unstable <=