Commit 1346f51e authored by Eric Van Hensbergen's avatar Eric Van Hensbergen Committed by Linus Torvalds

[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: default avatarEric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3ed8491c
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
*/ */
#include <linux/errno.h> #include <linux/errno.h>
#include <asm/errno.h>
struct errormap { struct errormap {
char *name; char *name;
...@@ -43,87 +44,82 @@ static struct hlist_head hash_errmap[ERRHASHSZ]; ...@@ -43,87 +44,82 @@ static struct hlist_head hash_errmap[ERRHASHSZ];
/* FixMe - reduce to a reasonable size */ /* FixMe - reduce to a reasonable size */
static struct errormap errmap[] = { static struct errormap errmap[] = {
{"Operation not permitted", 1}, {"Operation not permitted", EPERM},
{"wstat prohibited", 1}, {"wstat prohibited", EPERM},
{"No such file or directory", 2}, {"No such file or directory", ENOENT},
{"file not found", 2}, {"file not found", ENOENT},
{"Interrupted system call", 4}, {"Interrupted system call", EINTR},
{"Input/output error", 5}, {"Input/output error", EIO},
{"No such device or address", 6}, {"No such device or address", ENXIO},
{"Argument list too long", 7}, {"Argument list too long", E2BIG},
{"Bad file descriptor", 9}, {"Bad file descriptor", EBADF},
{"Resource temporarily unavailable", 11}, {"Resource temporarily unavailable", EAGAIN},
{"Cannot allocate memory", 12}, {"Cannot allocate memory", ENOMEM},
{"Permission denied", 13}, {"Permission denied", EACCES},
{"Bad address", 14}, {"Bad address", EFAULT},
{"Block device required", 15}, {"Block device required", ENOTBLK},
{"Device or resource busy", 16}, {"Device or resource busy", EBUSY},
{"File exists", 17}, {"File exists", EEXIST},
{"Invalid cross-device link", 18}, {"Invalid cross-device link", EXDEV},
{"No such device", 19}, {"No such device", ENODEV},
{"Not a directory", 20}, {"Not a directory", ENOTDIR},
{"Is a directory", 21}, {"Is a directory", EISDIR},
{"Invalid argument", 22}, {"Invalid argument", EINVAL},
{"Too many open files in system", 23}, {"Too many open files in system", ENFILE},
{"Too many open files", 24}, {"Too many open files", EMFILE},
{"Text file busy", 26}, {"Text file busy", ETXTBSY},
{"File too large", 27}, {"File too large", EFBIG},
{"No space left on device", 28}, {"No space left on device", ENOSPC},
{"Illegal seek", 29}, {"Illegal seek", ESPIPE},
{"Read-only file system", 30}, {"Read-only file system", EROFS},
{"Too many links", 31}, {"Too many links", EMLINK},
{"Broken pipe", 32}, {"Broken pipe", EPIPE},
{"Numerical argument out of domain", 33}, {"Numerical argument out of domain", EDOM},
{"Numerical result out of range", 34}, {"Numerical result out of range", ERANGE},
{"Resource deadlock avoided", 35}, {"Resource deadlock avoided", EDEADLK},
{"File name too long", 36}, {"File name too long", ENAMETOOLONG},
{"No locks available", 37}, {"No locks available", ENOLCK},
{"Function not implemented", 38}, {"Function not implemented", ENOSYS},
{"Directory not empty", 39}, {"Directory not empty", ENOTEMPTY},
{"Too many levels of symbolic links", 40}, {"Too many levels of symbolic links", ELOOP},
{"Unknown error 41", 41}, {"No message of desired type", ENOMSG},
{"No message of desired type", 42}, {"Identifier removed", EIDRM},
{"Identifier removed", 43}, {"No data available", ENODATA},
{"File locking deadlock error", 58}, {"Machine is not on the network", ENONET},
{"No data available", 61}, {"Package not installed", ENOPKG},
{"Machine is not on the network", 64}, {"Object is remote", EREMOTE},
{"Package not installed", 65}, {"Link has been severed", ENOLINK},
{"Object is remote", 66}, {"Communication error on send", ECOMM},
{"Link has been severed", 67}, {"Protocol error", EPROTO},
{"Communication error on send", 70}, {"Bad message", EBADMSG},
{"Protocol error", 71}, {"File descriptor in bad state", EBADFD},
{"Bad message", 74}, {"Streams pipe error", ESTRPIPE},
{"File descriptor in bad state", 77}, {"Too many users", EUSERS},
{"Streams pipe error", 86}, {"Socket operation on non-socket", ENOTSOCK},
{"Too many users", 87}, {"Message too long", EMSGSIZE},
{"Socket operation on non-socket", 88}, {"Protocol not available", ENOPROTOOPT},
{"Message too long", 90}, {"Protocol not supported", EPROTONOSUPPORT},
{"Protocol not available", 92}, {"Socket type not supported", ESOCKTNOSUPPORT},
{"Protocol not supported", 93}, {"Operation not supported", EOPNOTSUPP},
{"Socket type not supported", 94}, {"Protocol family not supported", EPFNOSUPPORT},
{"Operation not supported", 95}, {"Network is down", ENETDOWN},
{"Protocol family not supported", 96}, {"Network is unreachable", ENETUNREACH},
{"Network is down", 100}, {"Network dropped connection on reset", ENETRESET},
{"Network is unreachable", 101}, {"Software caused connection abort", ECONNABORTED},
{"Network dropped connection on reset", 102}, {"Connection reset by peer", ECONNRESET},
{"Software caused connection abort", 103}, {"No buffer space available", ENOBUFS},
{"Connection reset by peer", 104}, {"Transport endpoint is already connected", EISCONN},
{"No buffer space available", 105}, {"Transport endpoint is not connected", ENOTCONN},
{"Transport endpoint is already connected", 106}, {"Cannot send after transport endpoint shutdown", ESHUTDOWN},
{"Transport endpoint is not connected", 107}, {"Connection timed out", ETIMEDOUT},
{"Cannot send after transport endpoint shutdown", 108}, {"Connection refused", ECONNREFUSED},
{"Connection timed out", 110}, {"Host is down", EHOSTDOWN},
{"Connection refused", 111}, {"No route to host", EHOSTUNREACH},
{"Host is down", 112}, {"Operation already in progress", EALREADY},
{"No route to host", 113}, {"Operation now in progress", EINPROGRESS},
{"Operation already in progress", 114}, {"Is a named type file", EISNAM},
{"Operation now in progress", 115}, {"Remote I/O error", EREMOTEIO},
{"Is a named type file", 120}, {"Disk quota exceeded", EDQUOT},
{"Remote I/O error", 121},
{"Disk quota exceeded", 122},
{"Operation canceled", 125},
{"Unknown error 126", 126},
{"Unknown error 127", 127},
/* errors from fossil, vacfs, and u9fs */ /* errors from fossil, vacfs, and u9fs */
{"fid unknown or out of range", EBADF}, {"fid unknown or out of range", EBADF},
{"permission denied", EACCES}, {"permission denied", EACCES},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment