- 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
This commit is contained in:
Bernhard Reutner-Fischer
2008-06-01 10:10:22 +00:00
parent e0fd13e901
commit 62d8503589
5 changed files with 19 additions and 22 deletions

View File

@@ -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));