]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
last: never restrict session time
authorSami Kerola <kerolasa@iki.fi>
Wed, 28 Aug 2013 14:37:46 +0000 (15:37 +0100)
committerSami Kerola <kerolasa@iki.fi>
Thu, 29 Aug 2013 17:14:09 +0000 (18:14 +0100)
When a session time will reach whopping 10000 days the last round bracket
is unnecessarily removed from output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
login-utils/last.c

index 93dc8d40ebbd94e2efcb607a26d437f4de2a2b42..dd0ca4912dd11e58b1fe113394223e0be5d2f778 100644 (file)
@@ -462,7 +462,7 @@ static int list(const struct last_control *ctl, struct utmp *p, time_t t, int wh
        if (ctl->showhost) {
                if (!ctl->altlist) {
                        len = snprintf(final, sizeof(final),
-                               "%-8.*s %-12.12s %-16.*s %-*.*s %-*.*s %-12.12s\n",
+                               "%-8.*s %-12.12s %-16.*s %-*.*s %-*.*s %s\n",
                                ctl->name_len, p->ut_name, utline,
                                ctl->domain_len, domain,
                                tftl[ctl->time_fmt].in, tftl[ctl->time_fmt].in, logintime,
@@ -478,7 +478,7 @@ static int list(const struct last_control *ctl, struct utmp *p, time_t t, int wh
                }
        } else
                len = snprintf(final, sizeof(final),
-                       "%-8.*s %-12.12s %-*.*s %-*.*s %-12.12s\n",
+                       "%-8.*s %-12.12s %-*.*s %-*.*s %s\n",
                        ctl->name_len, p->ut_name, utline,
                        tftl[ctl->time_fmt].in, tftl[ctl->time_fmt].in, logintime,
                        tftl[ctl->time_fmt].out, tftl[ctl->time_fmt].out, logouttime,