diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-11 06:35:41 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-11 06:35:41 +0000 |
commit | e5569cb52e319ec3b2c620b409324be884ac0076 (patch) | |
tree | 10cba91b3e71b632a3fb02d5c3d00e10cf8ffa42 | |
parent | 40702dac932c82e8387042e6710ae822152961d4 (diff) | |
download | busybox-w32-e5569cb52e319ec3b2c620b409324be884ac0076.tar.gz busybox-w32-e5569cb52e319ec3b2c620b409324be884ac0076.tar.bz2 busybox-w32-e5569cb52e319ec3b2c620b409324be884ac0076.zip |
who: fix wrong date/time field size
-rw-r--r-- | coreutils/who.c | 5 |
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) | |||
52 | } | 52 | } |
53 | 53 | ||
54 | setutent(); | 54 | setutent(); |
55 | printf("USER TTY IDLE TIME HOST\n"); | 55 | printf("USER TTY IDLE TIME HOST\n"); |
56 | while ((ut = getutent()) != NULL) { | 56 | while ((ut = getutent()) != NULL) { |
57 | if (ut->ut_user[0] && ut->ut_type == USER_PROCESS) { | 57 | if (ut->ut_user[0] && ut->ut_type == USER_PROCESS) { |
58 | time_t thyme = ut->ut_tv.tv_sec; | 58 | time_t thyme = ut->ut_tv.tv_sec; |
@@ -63,7 +63,8 @@ int who_main(int argc, char **argv) | |||
63 | str6[1] = '\0'; | 63 | str6[1] = '\0'; |
64 | if (stat(name, &st) == 0) | 64 | if (stat(name, &st) == 0) |
65 | idle_string(str6, st.st_atime); | 65 | idle_string(str6, st.st_atime); |
66 | printf("%-10s %-8s %-9s %-14.14s %s\n", | 66 | /* 15 chars for time: Nov 10 19:33:20 */ |
67 | printf("%-10s %-8s %-9s %-15.15s %s\n", | ||
67 | ut->ut_user, ut->ut_line, str6, | 68 | ut->ut_user, ut->ut_line, str6, |
68 | ctime(&thyme) + 4, ut->ut_host); | 69 | ctime(&thyme) + 4, ut->ut_host); |
69 | if (ENABLE_FEATURE_CLEAN_UP) | 70 | if (ENABLE_FEATURE_CLEAN_UP) |