* [PATCH] tools/hotplug/Linux/block: fix shared loop device detection
@ 2011-07-06 22:39 Zhigang Wang
2011-07-07 8:19 ` Olaf Hering
2011-07-08 17:12 ` Ian Jackson
0 siblings, 2 replies; 3+ messages in thread
From: Zhigang Wang @ 2011-07-06 22:39 UTC (permalink / raw)
To: xen-devel; +Cc: zhigang.x.wang
# HG changeset patch
# User Zhigang Wang <zhigang.x.wang@oracle.com>
# Date 1309991886 14400
# Node ID 52449dfa903562aa563fef0d229e2dc61a768f4c
# Parent 2f63562df1c4230492a81793dce3672f93c93d9a
tools/hotplug/Linux/block: fix shared loop device detection
We need to prefix 0 or more '0' to '$dev':
# stat -c '%D' "/system.img"
13
# losetup -a
/dev/loop0: [0013]:12062248 (/system.img)
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
diff -r 2f63562df1c4 -r 52449dfa9035 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block Mon Jun 27 17:37:12 2011 +0100
+++ b/tools/hotplug/Linux/block Wed Jul 06 18:38:06 2011 -0400
@@ -280,7 +280,7 @@ mount it read-write in a guest domain."
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" ]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/hotplug/Linux/block: fix shared loop device detection
2011-07-06 22:39 [PATCH] tools/hotplug/Linux/block: fix shared loop device detection Zhigang Wang
@ 2011-07-07 8:19 ` Olaf Hering
2011-07-08 17:12 ` Ian Jackson
1 sibling, 0 replies; 3+ messages in thread
From: Olaf Hering @ 2011-07-07 8:19 UTC (permalink / raw)
To: Zhigang Wang; +Cc: xen-devel
On Wed, Jul 06, Zhigang Wang wrote:
> # HG changeset patch
> # User Zhigang Wang <zhigang.x.wang@oracle.com>
> # Date 1309991886 14400
> # Node ID 52449dfa903562aa563fef0d229e2dc61a768f4c
> # Parent 2f63562df1c4230492a81793dce3672f93c93d9a
> tools/hotplug/Linux/block: fix shared loop device detection
>
> We need to prefix 0 or more '0' to '$dev':
>
> # stat -c '%D' "/system.img"
> 13
> # losetup -a
> /dev/loop0: [0013]:12062248 (/system.img)
>
> Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
The leading zero was in the 4.0 code. Thanks for spotting.
Acked-by: Olaf Hering <olaf@aepfle.de>
Olaf
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/hotplug/Linux/block: fix shared loop device detection
2011-07-06 22:39 [PATCH] tools/hotplug/Linux/block: fix shared loop device detection Zhigang Wang
2011-07-07 8:19 ` Olaf Hering
@ 2011-07-08 17:12 ` Ian Jackson
1 sibling, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2011-07-08 17:12 UTC (permalink / raw)
To: Zhigang Wang; +Cc: xen-devel
Zhigang Wang writes ("[Xen-devel] [PATCH] tools/hotplug/Linux/block: fix shared loop device detection"):
> tools/hotplug/Linux/block: fix shared loop device detection
>
> We need to prefix 0 or more '0' to '$dev':
Thanks, applied.
Ian.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-08 17:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-06 22:39 [PATCH] tools/hotplug/Linux/block: fix shared loop device detection Zhigang Wang
2011-07-07 8:19 ` Olaf Hering
2011-07-08 17:12 ` Ian Jackson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.