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] tools: fix shared loop device detection i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools: fix shared loop device detection in block hotplug script
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Sun, 10 Jul 2011 08:44:17 +0100
Delivery-date: Sun, 10 Jul 2011 00:46:26 -0700
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 Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
# Date 1310145146 -3600
# Node ID 443c6a7b6079f490d9adbb46352c20c2628fb144
# Parent  0648846b4d17c5b09c11ffe48a49fbb7616f630e
tools: fix shared loop device detection in block hotplug script

We need to cope with 0 or more '0' prefixed to '$dev':

  # stat -c '%D' "/system.img"
  13
  # losetup -a
  /dev/loop0: [0013]:12062248 (/system.img)

Signed-off-by: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 0648846b4d17 -r 443c6a7b6079 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block Fri Jul 08 18:10:48 2011 +0100
+++ b/tools/hotplug/Linux/block Fri Jul 08 18:12:26 2011 +0100
@@ -280,7 +280,7 @@
           fi
 
           shared_list=$(losetup -a |
-                sed -n -e 
"s@^\([^:]\+\)\(:[[:blank:]]\[${dev}\]:${inode}[[:blank:]](.*)\)@\1@p" )
+                sed -n -e 
"s@^\([^:]\+\)\(:[[:blank:]]\[0*${dev}\]:${inode}[[:blank:]](.*)\)@\1@p" )
           for dev in $shared_list
           do
             if [ -n "$dev" ]

_______________________________________________
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] tools: fix shared loop device detection in block hotplug script, Xen patchbot-unstable <=