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 blktap script for versions of readlin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix blktap script for versions of readlink command that do not handle
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 07 Sep 2007 09:13:36 -0700
Delivery-date: Fri, 07 Sep 2007 09:26:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1188555021 -3600
# Node ID 577313e3c0a6681e97a06088d57484246cbc9664
# Parent  86a154e1ef5d404dd0d6577a03e913e0829462f3
Fix blktap script for versions of readlink command that do not handle
regular files.
Signed-off-by: Ben Guthro <bguthro@xxxxxxxxxxxxxxx>
Signed-off-by: Josh Nicholas <jnicholas@xxxxxxxxxxxxxxx>
---
 tools/examples/blktap |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)

diff -r 86a154e1ef5d -r 577313e3c0a6 tools/examples/blktap
--- a/tools/examples/blktap     Fri Aug 31 11:06:22 2007 +0100
+++ b/tools/examples/blktap     Fri Aug 31 11:10:21 2007 +0100
@@ -69,7 +69,13 @@ then
         p=${p#*:}
     fi
 fi
-file=$(readlink -f "$p") || ebusy "$p does not exist."
+# some versions of readlink cannot be passed a regular file
+if [ -L "$p" ]; then
+    file=$(readlink -f "$p") || ebusy "$p link does not exist."
+else
+    [ -f "$p" ] || { ebusy "$p file does not exist." }
+    file="$p"
+fi
 
 if [ "$mode" != '!' ] 
 then

_______________________________________________
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 blktap script for versions of readlink command that do not handle, Xen patchbot-unstable <=