summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2023-05-28 06:21:00 +0000
committerdholland <dholland@NetBSD.org>2023-05-28 06:21:00 +0000
commit8736c3cd8fffb300bf4e42fbde7ff5482eb09dbc (patch)
treeb3a55387ba026ef80348829a78d50ae1a0ef60ed
parent9fee7747603cf5b5a605e6cf9b075317fbae095b (diff)
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.
-rw-r--r--sys/sys/param.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 6313435c169..9121f4a9318 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -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>)
*/