54d50897d5
<linux/kernel.h> tends to be cluttered because we often put various sort of unrelated stuff in it. So, we have split out a sensible chunk of code into a separate header from time to time. This commit splits out the *_MAX and *_MIN defines. The standard header <limits.h> contains various MAX, MIN constants including numerial limits. [1] I think it makes sense to move in-kernel MAX, MIN constants into include/linux/limits.h. We already have include/uapi/linux/limits.h to contain some user-space constants. I changed its include guard to _UAPI_LINUX_LIMITS_H. This change has no impact to the user-space because scripts/headers_install.sh rips off the '_UAPI' prefix from the include guards of exported headers. [1] http://pubs.opengroup.org/onlinepubs/009604499/basedefs/limits.h.html Link: http://lkml.kernel.org/r/1549156242-20806-2-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Alex Elder <elder@linaro.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Zhang Yanmin <yanmin.zhang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
22 lines
947 B
C
22 lines
947 B
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
#ifndef _UAPI_LINUX_LIMITS_H
|
|
#define _UAPI_LINUX_LIMITS_H
|
|
|
|
#define NR_OPEN 1024
|
|
|
|
#define NGROUPS_MAX 65536 /* supplemental group IDs are available */
|
|
#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
|
|
#define LINK_MAX 127 /* # links a file may have */
|
|
#define MAX_CANON 255 /* size of the canonical input queue */
|
|
#define MAX_INPUT 255 /* size of the type-ahead buffer */
|
|
#define NAME_MAX 255 /* # chars in a file name */
|
|
#define PATH_MAX 4096 /* # chars in a path name including nul */
|
|
#define PIPE_BUF 4096 /* # bytes in atomic write to a pipe */
|
|
#define XATTR_NAME_MAX 255 /* # chars in an extended attribute name */
|
|
#define XATTR_SIZE_MAX 65536 /* size of an extended attribute value (64k) */
|
|
#define XATTR_LIST_MAX 65536 /* size of extended attribute namelist (64k) */
|
|
|
|
#define RTSIG_MAX 32
|
|
|
|
#endif
|