mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
fs: Still print fid for 'getfid' if GetCell fails
Currently, 'fs getfid' fails if we cannot get the cell for the given file via GetCell(). This GetCell call was added in commitd390df097c
(fs getfid output changed for consistency with Windows implementation) to be more similar to the WINNT 'fs getfid', but the WINNT 'fs getfid' still prints the fid if getting the cell fails (and has since it was introduced in commit5520747790
(windows-fs-getfid-20090511)). GetCell() shouldn't normally fail if getting the fid succeeded, but in case it does, don't prevent us from printing the fid. Change 'fs getfid' to just say the cell is "unknown-cell" and keep going. Change-Id: Idd4727304061e1ec4eeddd98bd9eaab5de96e2b6 Reviewed-on: https://gerrit.openafs.org/15585 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
parent
cad39264b6
commit
93036c852d
@ -4294,12 +4294,7 @@ GetFidCmd(struct cmd_syndesc *as, void *arock)
|
||||
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;
|
||||
goto next_item;
|
||||
strlcpy(cell, "unknown-cell", sizeof(cell));
|
||||
}
|
||||
|
||||
printf("File %s (%u.%u.%u) located in cell %s\n",
|
||||
|
Loading…
Reference in New Issue
Block a user