[prev in list] [next in list] [prev in thread] [next in thread] 

List:       util-linux-ng
Subject:    [PATCH 18/21] last: never restrict session time
From:       Sami Kerola <kerolasa () iki ! fi>
Date:       2013-08-28 18:55:21
Message-ID: 1377716124-12491-1-git-send-email-kerolasa () iki ! fi
[Download RAW message or body]

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

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic