diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-12-11 04:04:26 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-12-11 04:04:26 +0000 |
commit | 80ff9449bf01d1134e0cbf1806a9d2223348f360 (patch) | |
tree | 1958125e34b54a3e5e878cec6413f79d16b25cc3 /util-linux/nfsmount.c | |
parent | 0552b9a7ffbf4d1211029fd1f369f4840ef97083 (diff) | |
download | busybox-w32-80ff9449bf01d1134e0cbf1806a9d2223348f360.tar.gz busybox-w32-80ff9449bf01d1134e0cbf1806a9d2223348f360.tar.bz2 busybox-w32-80ff9449bf01d1134e0cbf1806a9d2223348f360.zip |
Eliminate dependancy on kernel header files. Naughty naughty.
Using linux kernel headers is a Bad Thing(tm) and should be
punished.
-Erik
Diffstat (limited to 'util-linux/nfsmount.c')
-rw-r--r-- | util-linux/nfsmount.c | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c index cd722acc3..ba14aa6bc 100644 --- a/util-linux/nfsmount.c +++ b/util-linux/nfsmount.c | |||
@@ -50,9 +50,56 @@ | |||
50 | #include <rpc/rpc.h> | 50 | #include <rpc/rpc.h> |
51 | #include <rpc/pmap_prot.h> | 51 | #include <rpc/pmap_prot.h> |
52 | #include <rpc/pmap_clnt.h> | 52 | #include <rpc/pmap_clnt.h> |
53 | #include <linux/nfs.h> /* For the kernels nfs stuff */ | ||
54 | #include "nfsmount.h" | 53 | #include "nfsmount.h" |
55 | 54 | ||
55 | |||
56 | /* | ||
57 | * NFS stats. The good thing with these values is that NFSv3 errors are | ||
58 | * a superset of NFSv2 errors (with the exception of NFSERR_WFLUSH which | ||
59 | * no-one uses anyway), so we can happily mix code as long as we make sure | ||
60 | * no NFSv3 errors are returned to NFSv2 clients. | ||
61 | * Error codes that have a `--' in the v2 column are not part of the | ||
62 | * standard, but seem to be widely used nevertheless. | ||
63 | */ | ||
64 | enum nfs_stat { | ||
65 | NFS_OK = 0, /* v2 v3 */ | ||
66 | NFSERR_PERM = 1, /* v2 v3 */ | ||
67 | NFSERR_NOENT = 2, /* v2 v3 */ | ||
68 | NFSERR_IO = 5, /* v2 v3 */ | ||
69 | NFSERR_NXIO = 6, /* v2 v3 */ | ||
70 | NFSERR_EAGAIN = 11, /* v2 v3 */ | ||
71 | NFSERR_ACCES = 13, /* v2 v3 */ | ||
72 | NFSERR_EXIST = 17, /* v2 v3 */ | ||
73 | NFSERR_XDEV = 18, /* v3 */ | ||
74 | NFSERR_NODEV = 19, /* v2 v3 */ | ||
75 | NFSERR_NOTDIR = 20, /* v2 v3 */ | ||
76 | NFSERR_ISDIR = 21, /* v2 v3 */ | ||
77 | NFSERR_INVAL = 22, /* v2 v3 that Sun forgot */ | ||
78 | NFSERR_FBIG = 27, /* v2 v3 */ | ||
79 | NFSERR_NOSPC = 28, /* v2 v3 */ | ||
80 | NFSERR_ROFS = 30, /* v2 v3 */ | ||
81 | NFSERR_MLINK = 31, /* v3 */ | ||
82 | NFSERR_OPNOTSUPP = 45, /* v2 v3 */ | ||
83 | NFSERR_NAMETOOLONG = 63, /* v2 v3 */ | ||
84 | NFSERR_NOTEMPTY = 66, /* v2 v3 */ | ||
85 | NFSERR_DQUOT = 69, /* v2 v3 */ | ||
86 | NFSERR_STALE = 70, /* v2 v3 */ | ||
87 | NFSERR_REMOTE = 71, /* v2 v3 */ | ||
88 | NFSERR_WFLUSH = 99, /* v2 */ | ||
89 | NFSERR_BADHANDLE = 10001, /* v3 */ | ||
90 | NFSERR_NOT_SYNC = 10002, /* v3 */ | ||
91 | NFSERR_BAD_COOKIE = 10003, /* v3 */ | ||
92 | NFSERR_NOTSUPP = 10004, /* v3 */ | ||
93 | NFSERR_TOOSMALL = 10005, /* v3 */ | ||
94 | NFSERR_SERVERFAULT = 10006, /* v3 */ | ||
95 | NFSERR_BADTYPE = 10007, /* v3 */ | ||
96 | NFSERR_JUKEBOX = 10008 /* v3 */ | ||
97 | }; | ||
98 | |||
99 | #define NFS_PROGRAM 100003 | ||
100 | |||
101 | |||
102 | |||
56 | #ifndef NFS_FHSIZE | 103 | #ifndef NFS_FHSIZE |
57 | static const int NFS_FHSIZE = 32; | 104 | static const int NFS_FHSIZE = 32; |
58 | #endif | 105 | #endif |