Module Name:    src
Committed By:   dholland
Date:           Sun May 28 06:21:00 UTC 2023

Modified Files:
        src/sys/sys: param.h

Log Message:
In sys/param.h document that MAXPATHLEN includes space for a null byte.

Also note that it's the same as PATH_MAX. Reflow the comment.

Suggested by Thierry Laronde.


To generate a diff of this commit:
cvs rdiff -u -r1.726 -r1.727 src/sys/sys/param.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.726 src/sys/sys/param.h:1.727
--- src/sys/sys/param.h:1.726	Sat Apr 22 14:05:36 2023
+++ src/sys/sys/param.h	Sun May 28 06:21:00 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.726 2023/04/22 14:05:36 riastradh Exp $	*/
+/*	$NetBSD: param.h,v 1.727 2023/05/28 06:21:00 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -395,13 +395,16 @@
 #define	MAXFRAG 	8
 
 /*
- * MAXPATHLEN defines the longest permissible path length after expanding
- * symbolic links. It is used to allocate a temporary buffer from the buffer
- * pool in which to do the name expansion, hence should be a power of two,
- * and must be less than or equal to MAXBSIZE.  MAXSYMLINKS defines the
- * maximum number of symbolic links that may be expanded in a path name.
- * It should be set high enough to allow all legitimate uses, but halt
- * infinite loops reasonably quickly.
+ * MAXPATHLEN defines the longest permissible path length after
+ * expanding symbolic links, including a trailing null terminator
+ * byte. It is used to allocate a temporary buffer from the buffer
+ * pool in which to do the name expansion, hence should be a power of
+ * two, and must be less than or equal to MAXBSIZE. It must be the
+ * same as PATH_MAX from <limits.h>.
+ *
+ * MAXSYMLINKS defines the maximum number of symbolic links that may
+ * be expanded in a path name. It should be set high enough to allow
+ * all legitimate uses, but halt infinite loops reasonably quickly.
  *
  * MAXSYMLINKS should be >= _POSIX_SYMLOOP_MAX (see <limits.h>)
  */

Reply via email to