From: Derrick Brashear Date: Wed, 24 Feb 2010 05:41:48 +0000 (-0500) Subject: correct magic vnode volumename parsing X-Git-Tag: openafs-devel-1_5_73~131 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=70c975728382557669d6f76b1b465efc54c3e216;p=packages%2Fo%2Fopenafs.git correct magic vnode volumename parsing if /afs/.:mount/cell:volume:vnode is passed in, don't pass the :vnode into the volume id lookup Change-Id: If877b467cd37f06dcb090c34560bf76f8e4b0d10 Reviewed-on: http://gerrit.openafs.org/1383 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/afs/VNOPS/afs_vnop_lookup.c b/src/afs/VNOPS/afs_vnop_lookup.c index be81ff32a..1e314fa5c 100644 --- a/src/afs/VNOPS/afs_vnop_lookup.c +++ b/src/afs/VNOPS/afs_vnop_lookup.c @@ -178,7 +178,12 @@ EvalMountData(char type, char *data, afs_uint32 states, afs_uint32 cellnum, /* Get the volume struct. Unless this volume name has ".readonly" or * ".backup" in it, this will get the volume struct for the RW volume. * The RO volume will be prefetched if requested (but not returned). + * Set up to use volname first. */ + cpos = afs_strchr(volnamep, ':'); /* if vno present */ + if (cpos) + *cpos = 0; + /*printf("Calling GetVolumeByName\n");*/ tvp = afs_GetVolumeByName(volnamep, mtptCell, prefetch, areq, WRITE_LOCK); @@ -207,6 +212,9 @@ EvalMountData(char type, char *data, afs_uint32 states, afs_uint32 cellnum, } osi_FreeSmallSpace(buf); } + /* done with volname */ + if (cpos) + *cpos = ':'; if (!tvp) { /*printf("Couldn't find the volume\n");*/