aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-11-11 06:35:41 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-11-11 06:35:41 +0000
commite5569cb52e319ec3b2c620b409324be884ac0076 (patch)
tree10cba91b3e71b632a3fb02d5c3d00e10cf8ffa42
parent40702dac932c82e8387042e6710ae822152961d4 (diff)
downloadbusybox-e5569cb52e319ec3b2c620b409324be884ac0076.tar.gz
who: fix wrong date/time field size
-rw-r--r--coreutils/who.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/coreutils/who.c b/coreutils/who.c
index 6e7710c2d..75bb72456 100644
--- a/coreutils/who.c
+++ b/coreutils/who.c
@@ -52,7 +52,7 @@ int who_main(int argc, char **argv)
}
setutent();
- printf("USER TTY IDLE TIME HOST\n");
+ printf("USER TTY IDLE TIME HOST\n");
while ((ut = getutent()) != NULL) {
if (ut->ut_user[0] && ut->ut_type == USER_PROCESS) {
time_t thyme = ut->ut_tv.tv_sec;
@@ -63,7 +63,8 @@ int who_main(int argc, char **argv)
str6[1] = '\0';
if (stat(name, &st) == 0)
idle_string(str6, st.st_atime);
- printf("%-10s %-8s %-9s %-14.14s %s\n",
+ /* 15 chars for time: Nov 10 19:33:20 */
+ printf("%-10s %-8s %-9s %-15.15s %s\n",
ut->ut_user, ut->ut_line, str6,
ctime(&thyme) + 4, ut->ut_host);
if (ENABLE_FEATURE_CLEAN_UP)