From: Phillip Moore Date: Tue, 19 Oct 2010 15:23:46 +0000 (-0400) Subject: fs getfid output changed for consistency with Windows implementation X-Git-Tag: openafs-devel-1_5_78~17 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1739600c214d990b8d511d5bc6a1439316a7f153;p=packages%2Fo%2Fopenafs.git fs getfid output changed for consistency with Windows implementation This patch removes the redundant volume ID from the output of fs getfid, and replaces it with the cell name, which is what the Windows implementation provides. Reviewed-on: http://gerrit.openafs.org/3007 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit d390df097cac0fb7815c43e071040559612b6360) Change-Id: I930627e92672dd5012d5bca08d469f7fb7624be1 Reviewed-on: http://gerrit.openafs.org/3230 --- diff --git a/src/venus/fs.c b/src/venus/fs.c index 22e6e8468..4b3880918 100644 --- a/src/venus/fs.c +++ b/src/venus/fs.c @@ -4259,6 +4259,7 @@ GetFidCmd(struct cmd_syndesc *as, void *arock) afs_int32 code; int error = 0; + char cell[MAXCELLCHARS]; for (ti = as->parms[0].items; ti; ti = ti->next) { struct VenusFid vfid; @@ -4274,9 +4275,19 @@ GetFidCmd(struct cmd_syndesc *as, void *arock) continue; } - printf("File %s (%u.%u.%u) contained in volume %u\n", + code = GetCell(ti->data, cell); + if (code) { + if (errno == ENOENT) + fprintf(stderr, "%s: no such cell as '%s'\n", pn, ti->data); + else + Die(errno, ti->data); + error = 1; + continue; + } + + printf("File %s (%u.%u.%u) located in cell %s\n", ti->data, vfid.Fid.Volume, vfid.Fid.Vnode, vfid.Fid.Unique, - vfid.Fid.Volume); + cell); }