diff options
author | Thomas Bushnell <thomas@gnu.org> | 1996-08-12 18:31:04 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1996-08-12 18:31:04 +0000 |
commit | 9474c6318ad2effa3e80246d1012cb111e726bf0 (patch) | |
tree | b1f5dbfbd38913dcc4ebf721f81443472937dec0 /nfs/nfs.c | |
parent | 4b4fc640461f0f6e152204deda38a4e9272fe9e1 (diff) |
*** empty log message ***
Diffstat (limited to 'nfs/nfs.c')
-rw-r--r-- | nfs/nfs.c | 35 |
1 files changed, 33 insertions, 2 deletions
@@ -401,8 +401,39 @@ nfs_error_trans (int error) return ESTALE; case NFSERR_WFLUSH: - default: + /* Not known in v3, but we just give EINVAL for unknown errors + so it's the same. */ return EINVAL; + + default: + if (protocol_version == 2) + return EINVAL; + else + switch (error) + { + case NFSERR_XDEV: + return EXDEV; + + case NFSERR_INVAL: + case NFSERR_REMOTE: /* not sure about this one */ + default: + return EINVAL; + + case NFSERR_MLINK: + return EMLINK; + + case NFSERR_NOTSUPP: + return EOPNOTSUPP; + + case NFSERR_BADHANDLE: + case NFSERR_NOT_SYNC: + case NFSERR_BAD_COOKIE: + case NFSERR_TOOSMALL: + case NFSERR_SERVERFAULT: /* perhaps EIO instead?? */ + case NFSERR_BADTYPE: + case NFSERR_JUKEBOX: /* ??? */ + /* These indicate bugs in the client, so EGRATUITOUS is right. */ + return EGRATUITOUS; + } } } - |