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 /miscutils/last.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 'miscutils/last.c')
-rw-r--r-- | miscutils/last.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/miscutils/last.c b/miscutils/last.c index a84e77644..a8800bfe6 100644 --- a/miscutils/last.c +++ b/miscutils/last.c | |||
@@ -83,17 +83,17 @@ int last_main(int argc, char **argv ATTRIBUTE_UNUSED) | |||
83 | ut.ut_type = RUN_LVL; | 83 | ut.ut_type = RUN_LVL; |
84 | #endif | 84 | #endif |
85 | } else { | 85 | } else { |
86 | if (ut.ut_name[0] == '\0' || strcmp(ut.ut_name, "LOGIN") == 0) { | 86 | if (ut.ut_user[0] == '\0' || strcmp(ut.ut_user, "LOGIN") == 0) { |
87 | /* Don't bother. This means we can't find how long | 87 | /* Don't bother. This means we can't find how long |
88 | * someone was logged in for. Oh well. */ | 88 | * someone was logged in for. Oh well. */ |
89 | goto next; | 89 | goto next; |
90 | } | 90 | } |
91 | if (ut.ut_type != DEAD_PROCESS | 91 | if (ut.ut_type != DEAD_PROCESS |
92 | && ut.ut_name[0] && ut.ut_line[0] | 92 | && ut.ut_user[0] && ut.ut_line[0] |
93 | ) { | 93 | ) { |
94 | ut.ut_type = USER_PROCESS; | 94 | ut.ut_type = USER_PROCESS; |
95 | } | 95 | } |
96 | if (strcmp(ut.ut_name, "date") == 0) { | 96 | if (strcmp(ut.ut_user, "date") == 0) { |
97 | if (n == TYPE_OLD_TIME) { /* '|' */ | 97 | if (n == TYPE_OLD_TIME) { /* '|' */ |
98 | ut.ut_type = OLD_TIME; | 98 | ut.ut_type = OLD_TIME; |
99 | } | 99 | } |