aboutsummaryrefslogtreecommitdiff
path: root/libbb/login.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-03-29 12:30:33 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-03-29 12:30:33 +0100
commit8f2cb7ab26b9c720c24cdeffb624bfe0c2352353 (patch)
tree8d76825f24632d338118919b0553f542fdd3a8aa /libbb/login.c
parent6c852bfcadd78f53ec7a5f35882636a2a4a66eb0 (diff)
downloadbusybox-8f2cb7ab26b9c720c24cdeffb624bfe0c2352353.tar.gz
libbb: introduce and use strftime_[YYYYMMDD]HHMMSS()
function old new delta strftime_fmt - 53 +53 strftime_YYYYMMDDHHMMSS - 12 +12 strftime_HHMMSS - 12 +12 human_time 44 43 -1 fmtstr_t 9 - -9 step_time 361 345 -16 watch_main 261 232 -29 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 0/3 up/down: 77/-55) Total: 22 bytes text data bss dec hex filename 919203 932 17692 937827 e4f63 busybox_old 919209 932 17692 937833 e4f69 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/login.c')
-rw-r--r--libbb/login.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libbb/login.c b/libbb/login.c
index 8a82c6add..8f080b775 100644
--- a/libbb/login.c
+++ b/libbb/login.c
@@ -16,7 +16,6 @@
#define LOGIN " login: "
static const char fmtstr_d[] ALIGN1 = "%A, %d %B %Y";
-static const char fmtstr_t[] ALIGN1 = "%H:%M:%S";
void FAST_FUNC print_login_issue(const char *issue_file, const char *tty)
{
@@ -73,7 +72,7 @@ void FAST_FUNC print_login_issue(const char *issue_file, const char *tty)
strftime(buf, sizeof(buf), fmtstr_d, localtime(&t));
break;
case 't':
- strftime(buf, sizeof(buf), fmtstr_t, localtime(&t));
+ strftime_HHMMSS(buf, sizeof(buf), &t);
break;
case 'l':
outbuf = tty;