summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfs/nfsproto.h
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2011-05-04 22:02:33 +0000
committerrmacklem <rmacklem@FreeBSD.org>2011-05-04 22:02:33 +0000
commit48e83eacf3f56abcf0a13583eb07ea21151165b3 (patch)
treea0c8f8c2dac2f2e476f656bc539b0e39d2a83c25 /sys/fs/nfs/nfsproto.h
parentfa0f3c42ef6452770ad1eaf8d50f9b2e7af7fb88 (diff)
downloadFreeBSD-src-48e83eacf3f56abcf0a13583eb07ea21151165b3.zip
FreeBSD-src-48e83eacf3f56abcf0a13583eb07ea21151165b3.tar.gz
Add a comment noting that the NFS code assumes that the
values of error numbers in sys/errno.h will be the same as the ones specified by the NFS RFCs and that the code needs to be fixed if error numbers are changed in sys/errno.h. Suggested by: Peter Jeremy MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfs/nfsproto.h')
-rw-r--r--sys/fs/nfs/nfsproto.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h
index f007b70..6b66c1f 100644
--- a/sys/fs/nfs/nfsproto.h
+++ b/sys/fs/nfs/nfsproto.h
@@ -66,6 +66,14 @@
#define NFSV4_SMALLSTR 50 /* Strings small enough for stack */
/* Stat numbers for rpc returns (version 2, 3 and 4) */
+/*
+ * These numbers are hard-wired in the RFCs, so they can't be changed.
+ * The code currently assumes that the ones < 10000 are the same as
+ * sys/errno.h and that sys/errno.h will never go as high as 10000.
+ * If the value in sys/errno.h of any entry listed below is changed,
+ * the NFS code must be modified to do the mapping between them.
+ * (You can ignore NFSERR_WFLUSH, since it is never actually used.)
+ */
#define NFSERR_OK 0
#define NFSERR_PERM 1
#define NFSERR_NOENT 2
OpenPOWER on IntegriCloud