← Commit list

e5569cb52

Denis Vlasenko
Denis Vlasenko
2007-11-11
FAILED Duration: 14s

Subject

who: fix wrong date/time field size

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/who.c+3 -2
@@ -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)