diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-06-01 10:10:22 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-06-01 10:10:22 +0000 |
commit | 62d85035895152c8232052dcfb1bbd3b549b7df9 (patch) | |
tree | 49c794fe1f2b108ddf394f6d0263d04b6a0973f5 /init | |
parent | e0fd13e901253c5742f1e80778e149a0a07dc874 (diff) | |
download | busybox-w32-62d85035895152c8232052dcfb1bbd3b549b7df9.tar.gz busybox-w32-62d85035895152c8232052dcfb1bbd3b549b7df9.tar.bz2 busybox-w32-62d85035895152c8232052dcfb1bbd3b549b7df9.zip |
- 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.c | 5 |
1 files changed, 1 insertions, 4 deletions
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 | |||
37 | int which, flags, rc = 1; | 37 | int which, flags, rc = 1; |
38 | #if ENABLE_FEATURE_WTMP | 38 | #if ENABLE_FEATURE_WTMP |
39 | struct utmp utmp; | 39 | struct utmp utmp; |
40 | struct timeval tv; | ||
41 | struct utsname uts; | 40 | struct utsname uts; |
42 | #endif | 41 | #endif |
43 | 42 | ||
@@ -56,9 +55,7 @@ RB_AUTOBOOT | |||
56 | close(creat(bb_path_wtmp_file, 0664)); | 55 | close(creat(bb_path_wtmp_file, 0664)); |
57 | } | 56 | } |
58 | memset(&utmp, 0, sizeof(utmp)); | 57 | memset(&utmp, 0, sizeof(utmp)); |
59 | gettimeofday(&tv, NULL); | 58 | utmp.ut_tv.tv_sec = time(NULL); |
60 | utmp.ut_tv.tv_sec = tv.tv_sec; | ||
61 | utmp.ut_tv.tv_usec = tv.tv_usec; | ||
62 | safe_strncpy(utmp.ut_user, "shutdown", UT_NAMESIZE); | 59 | safe_strncpy(utmp.ut_user, "shutdown", UT_NAMESIZE); |
63 | utmp.ut_type = RUN_LVL; | 60 | utmp.ut_type = RUN_LVL; |
64 | safe_strncpy(utmp.ut_id, "~~", sizeof(utmp.ut_id)); | 61 | safe_strncpy(utmp.ut_id, "~~", sizeof(utmp.ut_id)); |