From 78a301e00d05a0a9b60423794ef6b8ebc91d57b8 Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 22 Feb 2022 16:58:08 +0000 Subject: [PATCH] Add _MAXCOMLEN to syslimits, it is 24, and includes the NUL. Following commits will change sys/param.h MAXCOMLEN, sys/sysctl.h KI_MAXCOMLEN, sys/acct.h ac_comm[], dev/ic/dtvar.h DTMAXCOMLEN to use this, and also adapt most to the included NUL correctly. This will allow us to remove sys/param.h include from userland base. sys/syslimits.h is chosen as the best place for this define because it has very small namespace which is already pulled in often. ok millert --- sys/sys/syslimits.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/sys/syslimits.h b/sys/sys/syslimits.h index 891c9b4173b..4ebc656224b 100644 --- a/sys/sys/syslimits.h +++ b/sys/sys/syslimits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syslimits.h,v 1.14 2020/04/02 18:00:00 deraadt Exp $ */ +/* $OpenBSD: syslimits.h,v 1.15 2022/02/22 16:58:08 deraadt Exp $ */ /* $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej Exp $ */ /* @@ -75,3 +75,5 @@ #if __POSIX_VISIBLE >= 200112 #define HOST_NAME_MAX 255 /* max hostname length w/o NUL */ #endif + +#define _MAXCOMLEN 24 /* includes NUL */ -- 2.20.1