]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
fs: display cell not available on ESRCH
authorMichael Meffie <mmeffie@sinenomine.net>
Fri, 7 Feb 2014 14:55:31 +0000 (06:55 -0800)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 26 Mar 2014 20:47:55 +0000 (13:47 -0700)
The cache manager pioctls abuse ESRCH to represent errors due to
unavailable cell information.  Give a more sensible error message to
the user when a pioctl returns an ESRCH error, instead of "no such
process", which is the conventional meaning of ESRCH.

The new error message is consistent with the Windows implementation
of fs.

For example, on a host with a misconfigured ThisCell and/or CellServDB.

    $ fs wscell
    fs: No such process

becomes:

    $ fs wscell
    fs: Cell name not recognized.

Reviewed-on: http://gerrit.openafs.org/10824
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit 8beba712d95b637225f215534a759961ff4d80a9)

Change-Id: I0cf6f6e0939a1075332049361153bc8a0b0958ce
Reviewed-on: http://gerrit.openafs.org/10949
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/venus/fs.c

index fd797b3e626e9ad3b08185ef7fb7d8f7630ec8f2..ba4776d80740b69e59acac25a9b95598772500d6 100644 (file)
@@ -3960,6 +3960,9 @@ Die(int errnum, char *filename)
                    "%s: You do not have the required rights to do this operation\n",
                    pn);
        break;
+    case ESRCH: /* hack: pioctls stole ESRCH for cell name not available errors. */
+       fprintf(stderr, "%s: Cell name not recognized.\n", pn);
+       break;
     default:
        if (filename)
            fprintf(stderr, "%s:'%s'", pn, filename);