diff options
author | Nathaniel Wesley Filardo <nwf@cs.jhu.edu> | 2014-08-21 14:10:55 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2015-04-01 16:36:15 -0400 |
commit | 53d5864bc673288f03bb7892a3cffa41a173082b (patch) | |
tree | 9aecb4d557f22d5ea9f8b9a227036e6c587c3eea /fs/afs | |
parent | 44ba06987c0b10faa998b9324850e8a6564c714d (diff) |
kafs: Add more "unified AFS" error codes
This should cover the set emitted by viced and the volume server.
Signed-off-by: Nathaniel Wesley Filardo <nwf@cs.jhu.edu>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs')
-rw-r--r-- | fs/afs/misc.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/afs/misc.c b/fs/afs/misc.c index 0dd4dafee10b..91ea1aa0d8b3 100644 --- a/fs/afs/misc.c +++ b/fs/afs/misc.c | |||
@@ -22,9 +22,12 @@ | |||
22 | int afs_abort_to_error(u32 abort_code) | 22 | int afs_abort_to_error(u32 abort_code) |
23 | { | 23 | { |
24 | switch (abort_code) { | 24 | switch (abort_code) { |
25 | /* low errno codes inserted into abort namespace */ | ||
25 | case 13: return -EACCES; | 26 | case 13: return -EACCES; |
26 | case 27: return -EFBIG; | 27 | case 27: return -EFBIG; |
27 | case 30: return -EROFS; | 28 | case 30: return -EROFS; |
29 | |||
30 | /* VICE "special error" codes; 101 - 111 */ | ||
28 | case VSALVAGE: return -EIO; | 31 | case VSALVAGE: return -EIO; |
29 | case VNOVNODE: return -ENOENT; | 32 | case VNOVNODE: return -ENOENT; |
30 | case VNOVOL: return -ENOMEDIUM; | 33 | case VNOVOL: return -ENOMEDIUM; |
@@ -36,11 +39,18 @@ int afs_abort_to_error(u32 abort_code) | |||
36 | case VOVERQUOTA: return -EDQUOT; | 39 | case VOVERQUOTA: return -EDQUOT; |
37 | case VBUSY: return -EBUSY; | 40 | case VBUSY: return -EBUSY; |
38 | case VMOVED: return -ENXIO; | 41 | case VMOVED: return -ENXIO; |
39 | case 0x2f6df0a: return -EWOULDBLOCK; | 42 | |
43 | /* Unified AFS error table; ET "uae" == 0x2f6df00 */ | ||
44 | case 0x2f6df00: return -EPERM; | ||
45 | case 0x2f6df01: return -ENOENT; | ||
46 | case 0x2f6df04: return -EIO; | ||
47 | case 0x2f6df0a: return -EAGAIN; | ||
48 | case 0x2f6df0b: return -ENOMEM; | ||
40 | case 0x2f6df0c: return -EACCES; | 49 | case 0x2f6df0c: return -EACCES; |
41 | case 0x2f6df0f: return -EBUSY; | 50 | case 0x2f6df0f: return -EBUSY; |
42 | case 0x2f6df10: return -EEXIST; | 51 | case 0x2f6df10: return -EEXIST; |
43 | case 0x2f6df11: return -EXDEV; | 52 | case 0x2f6df11: return -EXDEV; |
53 | case 0x2f6df12: return -ENODEV; | ||
44 | case 0x2f6df13: return -ENOTDIR; | 54 | case 0x2f6df13: return -ENOTDIR; |
45 | case 0x2f6df14: return -EISDIR; | 55 | case 0x2f6df14: return -EISDIR; |
46 | case 0x2f6df15: return -EINVAL; | 56 | case 0x2f6df15: return -EINVAL; |
@@ -54,8 +64,12 @@ int afs_abort_to_error(u32 abort_code) | |||
54 | case 0x2f6df23: return -ENAMETOOLONG; | 64 | case 0x2f6df23: return -ENAMETOOLONG; |
55 | case 0x2f6df24: return -ENOLCK; | 65 | case 0x2f6df24: return -ENOLCK; |
56 | case 0x2f6df26: return -ENOTEMPTY; | 66 | case 0x2f6df26: return -ENOTEMPTY; |
67 | case 0x2f6df28: return -EWOULDBLOCK; | ||
68 | case 0x2f6df69: return -ENOTCONN; | ||
69 | case 0x2f6df6c: return -ETIMEDOUT; | ||
57 | case 0x2f6df78: return -EDQUOT; | 70 | case 0x2f6df78: return -EDQUOT; |
58 | 71 | ||
72 | /* RXKAD abort codes; from include/rxrpc/packet.h. ET "RXK" == 0x1260B00 */ | ||
59 | case RXKADINCONSISTENCY: return -EPROTO; | 73 | case RXKADINCONSISTENCY: return -EPROTO; |
60 | case RXKADPACKETSHORT: return -EPROTO; | 74 | case RXKADPACKETSHORT: return -EPROTO; |
61 | case RXKADLEVELFAIL: return -EKEYREJECTED; | 75 | case RXKADLEVELFAIL: return -EKEYREJECTED; |