Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 May 2011 22:02:34 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r221462 - head/sys/fs/nfs
Message-ID:  <201105042202.p44M2YeZ069058@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Wed May  4 22:02:33 2011
New Revision: 221462
URL: http://svn.freebsd.org/changeset/base/221462

Log:
  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

Modified:
  head/sys/fs/nfs/nfsproto.h

Modified: head/sys/fs/nfs/nfsproto.h
==============================================================================
--- head/sys/fs/nfs/nfsproto.h	Wed May  4 21:49:34 2011	(r221461)
+++ head/sys/fs/nfs/nfsproto.h	Wed May  4 22:02:33 2011	(r221462)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105042202.p44M2YeZ069058>