Skip to content

Commit 53d5864

Browse files
Nathaniel Wesley Filardodhowells
authored andcommitted
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>
1 parent 44ba069 commit 53d5864

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

‎fs/afs/misc.c‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@
2222
int afs_abort_to_error(u32 abort_code)
2323
{
2424
switch (abort_code) {
25+
/* low errno codes inserted into abort namespace */
2526
case 13: return -EACCES;
2627
case 27: return -EFBIG;
2728
case 30: return -EROFS;
29+
30+
/* VICE "special error" codes; 101 - 111 */
2831
case VSALVAGE: return -EIO;
2932
case VNOVNODE: return -ENOENT;
3033
case VNOVOL: return -ENOMEDIUM;
@@ -36,11 +39,18 @@ int afs_abort_to_error(u32 abort_code)
3639
case VOVERQUOTA: return -EDQUOT;
3740
case VBUSY: return -EBUSY;
3841
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;
4049
case 0x2f6df0c: return -EACCES;
4150
case 0x2f6df0f: return -EBUSY;
4251
case 0x2f6df10: return -EEXIST;
4352
case 0x2f6df11: return -EXDEV;
53+
case 0x2f6df12: return -ENODEV;
4454
case 0x2f6df13: return -ENOTDIR;
4555
case 0x2f6df14: return -EISDIR;
4656
case 0x2f6df15: return -EINVAL;
@@ -54,8 +64,12 @@ int afs_abort_to_error(u32 abort_code)
5464
case 0x2f6df23: return -ENAMETOOLONG;
5565
case 0x2f6df24: return -ENOLCK;
5666
case 0x2f6df26: return -ENOTEMPTY;
67+
case 0x2f6df28: return -EWOULDBLOCK;
68+
case 0x2f6df69: return -ENOTCONN;
69+
case 0x2f6df6c: return -ETIMEDOUT;
5770
case 0x2f6df78: return -EDQUOT;
5871

72+
/* RXKAD abort codes; from include/rxrpc/packet.h. ET "RXK" == 0x1260B00 */
5973
case RXKADINCONSISTENCY: return -EPROTO;
6074
case RXKADPACKETSHORT: return -EPROTO;
6175
case RXKADLEVELFAIL: return -EKEYREJECTED;

0 commit comments

Comments
 (0)