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.
This commit is contained in:
parent
75411a3871
commit
80d04161c0
|
@ -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>)
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue