From 62d85035895152c8232052dcfb1bbd3b549b7df9 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sun, 1 Jun 2008 10:10:22 +0000 Subject: - use ut_user rather than ut_name (Cristian Ionescu-Idbohrn) - use ut_tv.tv_sec rather than ut_time (me) - shrink halt a little bit (me): halt_main 464 433 -31 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-31) Total: -31 bytes --- init/halt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'init') diff --git a/init/halt.c b/init/halt.c index c14f0f221..4fac3a86b 100644 --- a/init/halt.c +++ b/init/halt.c @@ -37,7 +37,6 @@ RB_AUTOBOOT int which, flags, rc = 1; #if ENABLE_FEATURE_WTMP struct utmp utmp; - struct timeval tv; struct utsname uts; #endif @@ -56,9 +55,7 @@ RB_AUTOBOOT close(creat(bb_path_wtmp_file, 0664)); } memset(&utmp, 0, sizeof(utmp)); - gettimeofday(&tv, NULL); - utmp.ut_tv.tv_sec = tv.tv_sec; - utmp.ut_tv.tv_usec = tv.tv_usec; + utmp.ut_tv.tv_sec = time(NULL); safe_strncpy(utmp.ut_user, "shutdown", UT_NAMESIZE); utmp.ut_type = RUN_LVL; safe_strncpy(utmp.ut_id, "~~", sizeof(utmp.ut_id)); -- cgit v1.2.3