diff options
author | Bernhard Reutner-Fischer | 2008-06-01 10:10:22 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2008-06-01 10:10:22 +0000 |
commit | 62d85035895152c8232052dcfb1bbd3b549b7df9 (patch) | |
tree | 49c794fe1f2b108ddf394f6d0263d04b6a0973f5 /loginutils/login.c | |
parent | e0fd13e901253c5742f1e80778e149a0a07dc874 (diff) | |
download | busybox-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 '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 900a7c0..d9a2f8a 100644 --- a/loginutils/login.c +++ b/loginutils/login.c @@ -80,7 +80,7 @@ static void read_or_build_utent(struct utmp *utptr, int picky) * remotely meaningful by skipping "tty"... */ strncpy(utptr->ut_id, short_tty + 3, sizeof(utptr->ut_id)); strncpy(utptr->ut_user, "LOGIN", sizeof(utptr->ut_user)); - utptr->ut_time = time(NULL); + utptr->ut_tv.tv_sec = time(NULL); } if (!picky) /* root login */ memset(utptr->ut_host, 0, sizeof(utptr->ut_host)); @@ -96,7 +96,7 @@ static void write_utent(struct utmp *utptr, const char *username) { utptr->ut_type = USER_PROCESS; strncpy(utptr->ut_user, username, sizeof(utptr->ut_user)); - utptr->ut_time = time(NULL); + utptr->ut_tv.tv_sec = time(NULL); /* other fields already filled in by read_or_build_utent above */ setutent(); pututline(utptr); |