From 70c975728382557669d6f76b1b465efc54c3e216 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Wed, 24 Feb 2010 00:41:48 -0500 Subject: [PATCH] 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 --- src/afs/VNOPS/afs_vnop_lookup.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/afs/VNOPS/afs_vnop_lookup.c b/src/afs/VNOPS/afs_vnop_lookup.c index be81ff3..1e314fa 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");*/ -- 1.9.4