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 /loginutils/login.c | |
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 'loginutils/login.c')
-rw-r--r-- | loginutils/login.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/loginutils/login.c b/loginutils/login.c index 900a7c042..d9a2f8a41 100644 --- a/loginutils/login.c +++ b/loginutils/login.c | |||
@@ -80,7 +80,7 @@ static void read_or_build_utent(struct utmp *utptr, int picky) | |||
80 | * remotely meaningful by skipping "tty"... */ | 80 | * remotely meaningful by skipping "tty"... */ |
81 | strncpy(utptr->ut_id, short_tty + 3, sizeof(utptr->ut_id)); | 81 | strncpy(utptr->ut_id, short_tty + 3, sizeof(utptr->ut_id)); |
82 | strncpy(utptr->ut_user, "LOGIN", sizeof(utptr->ut_user)); | 82 | strncpy(utptr->ut_user, "LOGIN", sizeof(utptr->ut_user)); |
83 | utptr->ut_time = time(NULL); | 83 | utptr->ut_tv.tv_sec = time(NULL); |
84 | } | 84 | } |
85 | if (!picky) /* root login */ | 85 | if (!picky) /* root login */ |
86 | memset(utptr->ut_host, 0, sizeof(utptr->ut_host)); | 86 | memset(utptr->ut_host, 0, sizeof(utptr->ut_host)); |
@@ -96,7 +96,7 @@ static void write_utent(struct utmp *utptr, const char *username) | |||
96 | { | 96 | { |
97 | utptr->ut_type = USER_PROCESS; | 97 | utptr->ut_type = USER_PROCESS; |
98 | strncpy(utptr->ut_user, username, sizeof(utptr->ut_user)); | 98 | strncpy(utptr->ut_user, username, sizeof(utptr->ut_user)); |
99 | utptr->ut_time = time(NULL); | 99 | utptr->ut_tv.tv_sec = time(NULL); |
100 | /* other fields already filled in by read_or_build_utent above */ | 100 | /* other fields already filled in by read_or_build_utent above */ |
101 | setutent(); | 101 | setutent(); |
102 | pututline(utptr); | 102 | pututline(utptr); |