tools/hotplug/Linux/blktap: remove optional tapdisk: prefix
PATCH 1/1 tools/hotplug/Linux/blktap: remove optional tapdisk: prefix
Perhaps this should even be further generalized (e.g. to remove any "[!/]*:" pattern prefixes) to be more forward compatible?
tools/hotplug/Linux/blktap +1 -0
@@ -59,6 +59,7 @@ if [ -n "$t" ] then p=$(xenstore_read "$XENBUS_PATH/params") + p=${p#tapdisk:} # if we have a ':', chew from head including : if echo $p | grep -q \: then
Perhaps this should even be further generalized (e.g. to remove any "[!/]*:" pattern prefixes) to be more forward compatible?
tools/hotplug/Linux/blktap +1 -0
@@ -59,6 +59,7 @@ if [ -n "$t" ] then p=$(xenstore_read "$XENBUS_PATH/params") + p=${p#tapdisk:} # if we have a ':', chew from head including : if echo $p | grep -q \: then
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 3 lines · Jan Beulich
Perhaps this should even be further generalized (e.g. to remove any "[!/]*:" pattern prefixes) to be more forward compatible?
Right. Need to handle the 'ioemu' subtype as well. How about just stripping of everything before the leading '/'? E.g. like the attached patch?
Regards,
Jim
tools/hotplug/Linux/blktap +2 -2
@@ -59,10 +59,10 @@ if [ -n "$t" ] then p=$(xenstore_read "$XENBUS_PATH/params") - # if we have a ':', chew from head including : + # if we have a ':', remove everything up to leading '/' if echo $p | grep -q \: then - p=${p#*:} + p="/${p#*/}" fi fi # some versions of readlink cannot be passed a regular file
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Jim Fehlig <[email protected]> 16.04.10 22:51 >>>
Quoted 3 lines · Jan Beulich
Perhaps this should even be further generalized (e.g. to remove any "[!/]*:" pattern prefixes) to be more forward compatible?
Right. Need to handle the 'ioemu' subtype as well. How about just stripping of everything before the leading '/'? E.g. like the attached patch?
Wouldn't that become wrong when remote locations are acceptable here (not sure if they aren't already), i.e. server:/path/file? If that is not expected to ever have a meaning and if relative paths aren't permitted here, then yes, that would of course be the best solution.
Jan
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Jan Beulich
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Jim Fehlig <[email protected]> 16.04.10 22:51 >>>
Quoted 4 lines · Jan Beulich
Perhaps this should even be further generalized (e.g. to remove any "[!/]*:" pattern prefixes) to be more forward compatible?
Quoted 7 lines
Quoted 4 lines
Right. Need to handle the 'ioemu' subtype as well. How about just stripping of everything before the leading '/'? E.g. like the attached patch?
Wouldn't that become wrong when remote locations are acceptable here (not sure if they aren't already), i.e. server:/path/file?
IMO, remote locations should be handled by another tap driver optimized for the remote file protocol, similar to the nbd, curl, etc. block backends in qemu.
Quoted 4 lines
If that
is not expected to ever have a meaning and if relative paths aren't permitted here, then yes, that would of course be the best solution.
The tools currently don't cope with relative paths in disk specification.
Jim