[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Patch] fix canonicalize-existing vbd file
Do you mean to 'test -f "$file"'? A symlink will always fail 'test -f', and $p can be a symlink. -- Keir On 5/12/07 14:05, "Akio Takebe" <takebe_akio@xxxxxxxxxxxxxx> wrote: > Hi, Keir > >> The -e option is not available in all versions of readlink. > Thank you for your review. > How about the blew? > > Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx> > > > --- > diff -r 3057f813da14 tools/examples/block > --- a/tools/examples/block Thu Nov 29 19:30:33 2007 +0000 > +++ b/tools/examples/block Wed Dec 05 22:57:56 2007 +0900 > @@ -219,7 +219,8 @@ case "$command" in > file) > # Canonicalise the file, for sharing check comparison, and the mode > # for ease of use here. > - file=$(readlink -f "$p") || fatal "$p does not exist." > + test -f "$p" || fatal "$p does not exist." > + file=$(readlink -f "$p") > mode=$(canonicalise_mode "$mode") > > claim_lock "block" _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |