diff options
| author | Ron Yorston <rmy@pobox.com> | 2015-05-18 09:36:27 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2015-05-18 09:36:27 +0100 |
| commit | 60063627a6d540871061854a362047e6517f821c (patch) | |
| tree | 0de228630450c64e085f2e3f5141b5ba17eccab3 /init/halt.c | |
| parent | ec39cb770ddd5c0e085d5c4ee10be65bab5e7a44 (diff) | |
| parent | 9a595bb36ded308e6d4336aef2c1cd3ac738a398 (diff) | |
| download | busybox-w32-FRP.tar.gz busybox-w32-FRP.tar.bz2 busybox-w32-FRP.zip | |
Merge branch 'busybox' into mergeFRP
Diffstat (limited to 'init/halt.c')
| -rw-r--r-- | init/halt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/init/halt.c b/init/halt.c index 7974adb17..ad12d9148 100644 --- a/init/halt.c +++ b/init/halt.c | |||
| @@ -74,7 +74,7 @@ | |||
| 74 | 74 | ||
| 75 | static void write_wtmp(void) | 75 | static void write_wtmp(void) |
| 76 | { | 76 | { |
| 77 | struct utmp utmp; | 77 | struct utmpx utmp; |
| 78 | struct utsname uts; | 78 | struct utsname uts; |
| 79 | /* "man utmp" says wtmp file should *not* be created automagically */ | 79 | /* "man utmp" says wtmp file should *not* be created automagically */ |
| 80 | /*if (access(bb_path_wtmp_file, R_OK|W_OK) == -1) { | 80 | /*if (access(bb_path_wtmp_file, R_OK|W_OK) == -1) { |
| @@ -88,7 +88,7 @@ static void write_wtmp(void) | |||
| 88 | utmp.ut_line[0] = '~'; utmp.ut_line[1] = '~'; /* = strcpy(utmp.ut_line, "~~"); */ | 88 | utmp.ut_line[0] = '~'; utmp.ut_line[1] = '~'; /* = strcpy(utmp.ut_line, "~~"); */ |
| 89 | uname(&uts); | 89 | uname(&uts); |
| 90 | safe_strncpy(utmp.ut_host, uts.release, sizeof(utmp.ut_host)); | 90 | safe_strncpy(utmp.ut_host, uts.release, sizeof(utmp.ut_host)); |
| 91 | updwtmp(bb_path_wtmp_file, &utmp); | 91 | updwtmpx(bb_path_wtmp_file, &utmp); |
| 92 | } | 92 | } |
| 93 | #else | 93 | #else |
| 94 | #define write_wtmp() ((void)0) | 94 | #define write_wtmp() ((void)0) |
