From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 18/21] last: never restrict session time
Date: Wed, 28 Aug 2013 19:55:21 +0100 [thread overview]
Message-ID: <1377716124-12491-1-git-send-email-kerolasa@iki.fi> (raw)
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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/login-utils/last.c b/login-utils/last.c
index 4733c64..23cc8aa 100644
--- a/login-utils/last.c
+++ b/login-utils/last.c
@@ -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,
--
1.8.4
next reply other threads:[~2013-08-28 18:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 18:55 Sami Kerola [this message]
2013-08-28 18:55 ` [PATCH 19/21] tests: add last(1) test Sami Kerola
2013-08-28 18:55 ` [PATCH 20/21] last: trim trailing white spaces Sami Kerola
2013-08-28 18:55 ` [PATCH 21/21] last: tell verbally system is still running Sami Kerola
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1377716124-12491-1-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox