Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/coreutils/who.c


Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/coreutils/who.c

    r3232 r3621  
    7474int who_main(int argc UNUSED_PARAM, char **argv)
    7575{
    76     struct utmp *ut;
     76    struct utmpx *ut;
    7777    unsigned opt;
    7878    int do_users = (ENABLE_USERS && (!ENABLE_WHO || applet_name[0] == 'u'));
     
    8282    opt = getopt32(argv, do_users ? "" : "aH");
    8383    if (opt & 2) // -H
    84         printf("USER\t\tTTY\t\tIDLE\tTIME\t\t HOST\n");
     84        puts("USER\t\tTTY\t\tIDLE\tTIME\t\t HOST");
    8585
    86     setutent();
    87     while ((ut = getutent()) != NULL) {
     86    setutxent();
     87    while ((ut = getutxent()) != NULL) {
    8888        if (ut->ut_user[0]
    8989         && ((opt & 1) || ut->ut_type == USER_PROCESS)
     
    127127        bb_putchar('\n');
    128128    if (ENABLE_FEATURE_CLEAN_UP)
    129         endutent();
     129        endutxent();
    130130    return EXIT_SUCCESS;
    131131}
Note: See TracChangeset for help on using the changeset viewer.