* [PATCH] Allow blktap specification to be a path to a file
@ 2007-08-27 19:05 Ben Guthro
2007-08-30 15:35 ` Keir Fraser
0 siblings, 1 reply; 3+ messages in thread
From: Ben Guthro @ 2007-08-27 19:05 UTC (permalink / raw)
To: xen-devel; +Cc: Josh Nicholas
[-- Attachment #1: Type: text/plain, Size: 221 bytes --]
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 <bguthro@virtualiron.com>
Signed-off-by: Josh Nicholas <jnicholas@virtualiron.com>
[-- Attachment #2: xen-hotplug-blktap.patch --]
[-- Type: text/x-patch, Size: 473 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Allow blktap specification to be a path to a file
2007-08-27 19:05 [PATCH] Allow blktap specification to be a path to a file Ben Guthro
@ 2007-08-30 15:35 ` Keir Fraser
2007-08-30 15:43 ` Joshua Nicholas
0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2007-08-30 15:35 UTC (permalink / raw)
To: Ben Guthro, xen-devel; +Cc: Josh Nicholas
On 27/8/07 20:05, "Ben Guthro" <bguthro@virtualiron.com> wrote:
> 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 <bguthro@virtualiron.com>
> Signed-off-by: Josh Nicholas <jnicholas@virtualiron.com>
readlink should work fine on a real file, and just return its filename
unmodified.
-- Keir
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Allow blktap specification to be a path to a file
2007-08-30 15:35 ` Keir Fraser
@ 2007-08-30 15:43 ` Joshua Nicholas
0 siblings, 0 replies; 3+ messages in thread
From: Joshua Nicholas @ 2007-08-30 15:43 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel, Ben Guthro
[-- Attachment #1: Type: text/html, Size: 1365 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-30 15:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-27 19:05 [PATCH] Allow blktap specification to be a path to a file Ben Guthro
2007-08-30 15:35 ` Keir Fraser
2007-08-30 15:43 ` Joshua Nicholas
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.