Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/coreutils/who.c
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/coreutils/who.c
r3232 r3621 74 74 int who_main(int argc UNUSED_PARAM, char **argv) 75 75 { 76 struct utmp *ut;76 struct utmpx *ut; 77 77 unsigned opt; 78 78 int do_users = (ENABLE_USERS && (!ENABLE_WHO || applet_name[0] == 'u')); … … 82 82 opt = getopt32(argv, do_users ? "" : "aH"); 83 83 if (opt & 2) // -H 84 p rintf("USER\t\tTTY\t\tIDLE\tTIME\t\t HOST\n");84 puts("USER\t\tTTY\t\tIDLE\tTIME\t\t HOST"); 85 85 86 setut ent();87 while ((ut = getut ent()) != NULL) {86 setutxent(); 87 while ((ut = getutxent()) != NULL) { 88 88 if (ut->ut_user[0] 89 89 && ((opt & 1) || ut->ut_type == USER_PROCESS) … … 127 127 bb_putchar('\n'); 128 128 if (ENABLE_FEATURE_CLEAN_UP) 129 endut ent();129 endutxent(); 130 130 return EXIT_SUCCESS; 131 131 }
Note:
See TracChangeset
for help on using the changeset viewer.