public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 18/21] last: never restrict session time
@ 2013-08-28 18:55 Sami Kerola
  2013-08-28 18:55 ` [PATCH 19/21] tests: add last(1) test Sami Kerola
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sami Kerola @ 2013-08-28 18:55 UTC (permalink / raw)
  To: util-linux; +Cc: kerolasa

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-28 18:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-28 18:55 [PATCH 18/21] last: never restrict session time Sami Kerola
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox