From c1d7ec0ae5f57e2d82f545b94d54f7597fc60871 Mon Sep 17 00:00:00 2001 From: Mike Winter Date: Tue, 18 Oct 2016 11:24:45 -0600 Subject: [PATCH] Use system constants for process name length and username length. --- pidstat.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pidstat.h b/pidstat.h index b93599f..c8ea057 100644 --- a/pidstat.h +++ b/pidstat.h @@ -3,6 +3,9 @@ * (C) 2007-2016 by Sebastien Godard (sysstat orange.fr) */ +#include +#undef HZ + #ifndef _PIDSTAT_H #define _PIDSTAT_H @@ -15,9 +18,9 @@ #define NR_PID_PREALLOC 100 -#define MAX_COMM_LEN 128 -#define MAX_CMDLINE_LEN 128 -#define MAX_USER_LEN 32 +#define MAX_COMM_LEN _POSIX_ARG_MAX +#define MAX_CMDLINE_LEN _POSIX_ARG_MAX +#define MAX_USER_LEN LOGIN_NAME_MAX /* Activities */ #define P_A_CPU 0x01 -- 2.49.0