summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2008-06-01 10:10:22 +0000
committerBernhard Reutner-Fischer2008-06-01 10:10:22 +0000
commit62d85035895152c8232052dcfb1bbd3b549b7df9 (patch)
tree49c794fe1f2b108ddf394f6d0263d04b6a0973f5 /init
parente0fd13e901253c5742f1e80778e149a0a07dc874 (diff)
downloadbusybox-62d85035895152c8232052dcfb1bbd3b549b7df9.zip
busybox-62d85035895152c8232052dcfb1bbd3b549b7df9.tar.gz
- 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
Diffstat (limited to 'init')
-rw-r--r--init/halt.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/init/halt.c b/init/halt.c
index c14f0f2..4fac3a8 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));