From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Guthro Subject: [PATCH] Allow blktap specification to be a path to a file Date: Mon, 27 Aug 2007 15:05:22 -0400 Message-ID: <46D32072.5040609@virtualiron.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060209080605010108030603" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Josh Nicholas List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------060209080605010108030603 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Minor change to allow a blktap specification to be an actual path to a file instead of a soft link to a file Signed-off-by: Ben Guthro Signed-off-by: Josh Nicholas --------------060209080605010108030603 Content-Type: text/x-patch; name="xen-hotplug-blktap.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xen-hotplug-blktap.patch" diff -r b34eb51bc04c tools/examples/blktap --- a/tools/examples/blktap Thu Aug 16 19:37:12 2007 -0400 +++ b/tools/examples/blktap Thu Aug 16 19:37:12 2007 -0400 @@ -18,7 +18,12 @@ then p=${p#*:} fi fi -file=$(readlink -f "$p") || ebusy "$p does not exist." +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 [ "$command" = 'add' ] then --------------060209080605010108030603 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------060209080605010108030603--