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/miscutils/runlevel.c

    r3232 r3621  
    3030int runlevel_main(int argc UNUSED_PARAM, char **argv)
    3131{
    32     struct utmp *ut;
     32    struct utmpx *ut;
    3333    char prev;
    3434
    35     if (argv[1]) utmpname(argv[1]);
     35    if (argv[1]) utmpxname(argv[1]);
    3636
    37     setutent();
    38     while ((ut = getutent()) != NULL) {
     37    setutxent();
     38    while ((ut = getutxent()) != NULL) {
    3939        if (ut->ut_type == RUN_LVL) {
    4040            prev = ut->ut_pid / 256;
     
    4242            printf("%c %c\n", prev, ut->ut_pid % 256);
    4343            if (ENABLE_FEATURE_CLEAN_UP)
    44                 endutent();
     44                endutxent();
    4545            return 0;
    4646        }
     
    5050
    5151    if (ENABLE_FEATURE_CLEAN_UP)
    52         endutent();
     52        endutxent();
    5353    return 1;
    5454}
Note: See TracChangeset for help on using the changeset viewer.