From 7d8f3033539e81475b52e791a0693b30bb7e2e68 Mon Sep 17 00:00:00 2001 From: Calin Juravle <calin@google.com> Date: Tue, 6 May 2014 15:36:02 +0100 Subject: [PATCH] Allow for better utmp logging. Increase (UT_NAMESIZE,UT_LINESIZE,UT_HOSTSIZE) to (32,32,256). Nobody writes utmp on Android but it would be nice to be aligned with others who use 32,32,256 (like glibc). If ever used it will produce nicer logging. There is no consensus in BSDs for these values. Bug: 14584341 Bug: 12875898 Change-Id: I94af10b982b8f9fcaea897c4cf968563f38403f9 --- libc/include/utmp.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libc/include/utmp.h b/libc/include/utmp.h index ffd3c925a..d76422781 100644 --- a/libc/include/utmp.h +++ b/libc/include/utmp.h @@ -36,9 +36,15 @@ #define _PATH_WTMP "/var/log/wtmp" #define _PATH_LASTLOG "/var/log/lastlog" -#define UT_NAMESIZE 8 -#define UT_LINESIZE 8 -#define UT_HOSTSIZE 16 +#ifdef __LP64__ +#define UT_NAMESIZE 32 +#define UT_LINESIZE 32 +#define UT_HOSTSIZE 256 +#else +#define UT_NAMESIZE 8 +#define UT_LINESIZE 8 +#define UT_HOSTSIZE 16 +#endif #define USER_PROCESS 7