aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@gmail.com>2005-09-09 16:04:25 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:57:57 -0400
commit1346f51ede71fc1e5021062898d150e192dc4dc8 (patch)
treeec82268782cd75abd66d329ac617602cdb33db13
parent3ed8491c8a75cefe95b57f7f428a3e2ddd421e97 (diff)
[PATCH] v9fs: Change error magic numbers to defined constants
Change magic error numbers to system defined constants in v9fs error.h As suggested by Jan-Benedict Glaw. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/9p/error.h158
1 files changed, 77 insertions, 81 deletions
diff --git a/fs/9p/error.h b/fs/9p/error.h
index 4bf2cf5aa1bb..6dbb66f5b28f 100644
--- a/fs/9p/error.h
+++ b/fs/9p/error.h
@@ -30,6 +30,7 @@
30 */ 30 */
31 31
32#include <linux/errno.h> 32#include <linux/errno.h>
33#include <asm/errno.h>
33 34
34struct errormap { 35struct errormap {
35 char *name; 36 char *name;
@@ -43,87 +44,82 @@ static struct hlist_head hash_errmap[ERRHASHSZ];
43 44
44/* FixMe - reduce to a reasonable size */ 45/* FixMe - reduce to a reasonable size */
45static struct errormap errmap[] = { 46static struct errormap errmap[] = {
46 {"Operation not permitted", 1}, 47 {"Operation not permitted", EPERM},
47 {"wstat prohibited", 1}, 48 {"wstat prohibited", EPERM},
48 {"No such file or directory", 2}, 49 {"No such file or directory", ENOENT},
49 {"file not found", 2}, 50 {"file not found", ENOENT},
50 {"Interrupted system call", 4}, 51 {"Interrupted system call", EINTR},
51 {"Input/output error", 5}, 52 {"Input/output error", EIO},
52 {"No such device or address", 6}, 53 {"No such device or address", ENXIO},
53 {"Argument list too long", 7}, 54 {"Argument list too long", E2BIG},
54 {"Bad file descriptor", 9}, 55 {"Bad file descriptor", EBADF},
55 {"Resource temporarily unavailable", 11}, 56 {"Resource temporarily unavailable", EAGAIN},
56 {"Cannot allocate memory", 12}, 57 {"Cannot allocate memory", ENOMEM},
57 {"Permission denied", 13}, 58 {"Permission denied", EACCES},
58 {"Bad address", 14}, 59 {"Bad address", EFAULT},
59 {"Block device required", 15}, 60 {"Block device required", ENOTBLK},
60 {"Device or resource busy", 16}, 61 {"Device or resource busy", EBUSY},
61 {"File exists", 17}, 62 {"File exists", EEXIST},
62 {"Invalid cross-device link", 18}, 63 {"Invalid cross-device link", EXDEV},
63 {"No such device", 19}, 64 {"No such device", ENODEV},
64 {"Not a directory", 20}, 65 {"Not a directory", ENOTDIR},
65 {"Is a directory", 21}, 66 {"Is a directory", EISDIR},
66 {"Invalid argument", 22}, 67 {"Invalid argument", EINVAL},
67 {"Too many open files in system", 23}, 68 {"Too many open files in system", ENFILE},
68 {"Too many open files", 24}, 69 {"Too many open files", EMFILE},
69 {"Text file busy", 26}, 70 {"Text file busy", ETXTBSY},
70 {"File too large", 27}, 71 {"File too large", EFBIG},
71 {"No space left on device", 28}, 72 {"No space left on device", ENOSPC},
72 {"Illegal seek", 29}, 73 {"Illegal seek", ESPIPE},
73 {"Read-only file system", 30}, 74 {"Read-only file system", EROFS},
74 {"Too many links", 31}, 75 {"Too many links", EMLINK},
75 {"Broken pipe", 32}, 76 {"Broken pipe", EPIPE},
76 {"Numerical argument out of domain", 33}, 77 {"Numerical argument out of domain", EDOM},
77 {"Numerical result out of range", 34}, 78 {"Numerical result out of range", ERANGE},
78 {"Resource deadlock avoided", 35}, 79 {"Resource deadlock avoided", EDEADLK},
79 {"File name too long", 36}, 80 {"File name too long", ENAMETOOLONG},
80 {"No locks available", 37}, 81 {"No locks available", ENOLCK},
81 {"Function not implemented", 38}, 82 {"Function not implemented", ENOSYS},
82 {"Directory not empty", 39}, 83 {"Directory not empty", ENOTEMPTY},
83 {"Too many levels of symbolic links", 40}, 84 {"Too many levels of symbolic links", ELOOP},
84 {"Unknown error 41", 41}, 85 {"No message of desired type", ENOMSG},
85 {"No message of desired type", 42}, 86 {"Identifier removed", EIDRM},
86 {"Identifier removed", 43}, 87 {"No data available", ENODATA},
87 {"File locking deadlock error", 58}, 88 {"Machine is not on the network", ENONET},
88 {"No data available", 61}, 89 {"Package not installed", ENOPKG},
89 {"Machine is not on the network", 64}, 90 {"Object is remote", EREMOTE},
90 {"Package not installed", 65}, 91 {"Link has been severed", ENOLINK},
91 {"Object is remote", 66}, 92 {"Communication error on send", ECOMM},
92 {"Link has been severed", 67}, 93 {"Protocol error", EPROTO},
93 {"Communication error on send", 70}, 94 {"Bad message", EBADMSG},
94 {"Protocol error", 71}, 95 {"File descriptor in bad state", EBADFD},
95 {"Bad message", 74}, 96 {"Streams pipe error", ESTRPIPE},
96 {"File descriptor in bad state", 77}, 97 {"Too many users", EUSERS},
97 {"Streams pipe error", 86}, 98 {"Socket operation on non-socket", ENOTSOCK},
98 {"Too many users", 87}, 99 {"Message too long", EMSGSIZE},
99 {"Socket operation on non-socket", 88}, 100 {"Protocol not available", ENOPROTOOPT},
100 {"Message too long", 90}, 101 {"Protocol not supported", EPROTONOSUPPORT},
101 {"Protocol not available", 92}, 102 {"Socket type not supported", ESOCKTNOSUPPORT},
102 {"Protocol not supported", 93}, 103 {"Operation not supported", EOPNOTSUPP},
103 {"Socket type not supported", 94}, 104 {"Protocol family not supported", EPFNOSUPPORT},
104 {"Operation not supported", 95}, 105 {"Network is down", ENETDOWN},
105 {"Protocol family not supported", 96}, 106 {"Network is unreachable", ENETUNREACH},
106 {"Network is down", 100}, 107 {"Network dropped connection on reset", ENETRESET},
107 {"Network is unreachable", 101}, 108 {"Software caused connection abort", ECONNABORTED},
108 {"Network dropped connection on reset", 102}, 109 {"Connection reset by peer", ECONNRESET},
109 {"Software caused connection abort", 103}, 110 {"No buffer space available", ENOBUFS},
110 {"Connection reset by peer", 104}, 111 {"Transport endpoint is already connected", EISCONN},
111 {"No buffer space available", 105}, 112 {"Transport endpoint is not connected", ENOTCONN},
112 {"Transport endpoint is already connected", 106}, 113 {"Cannot send after transport endpoint shutdown", ESHUTDOWN},
113 {"Transport endpoint is not connected", 107}, 114 {"Connection timed out", ETIMEDOUT},
114 {"Cannot send after transport endpoint shutdown", 108}, 115 {"Connection refused", ECONNREFUSED},
115 {"Connection timed out", 110}, 116 {"Host is down", EHOSTDOWN},
116 {"Connection refused", 111}, 117 {"No route to host", EHOSTUNREACH},
117 {"Host is down", 112}, 118 {"Operation already in progress", EALREADY},
118 {"No route to host", 113}, 119 {"Operation now in progress", EINPROGRESS},
119 {"Operation already in progress", 114}, 120 {"Is a named type file", EISNAM},
120 {"Operation now in progress", 115}, 121 {"Remote I/O error", EREMOTEIO},
121 {"Is a named type file", 120}, 122 {"Disk quota exceeded", EDQUOT},
122 {"Remote I/O error", 121},
123 {"Disk quota exceeded", 122},
124 {"Operation canceled", 125},
125 {"Unknown error 126", 126},
126 {"Unknown error 127", 127},
127/* errors from fossil, vacfs, and u9fs */ 123/* errors from fossil, vacfs, and u9fs */
128 {"fid unknown or out of range", EBADF}, 124 {"fid unknown or out of range", EBADF},
129 {"permission denied", EACCES}, 125 {"permission denied", EACCES},