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/libbb/parse_mode.c

    r2725 r3621  
    1616#define FILEMODEBITS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
    1717
    18 int FAST_FUNC bb_parse_mode(const char *s, mode_t *current_mode)
     18int FAST_FUNC bb_parse_mode(const char *s, unsigned current_mode)
    1919{
    2020    static const mode_t who_mask[] = {
     
    4747        tmp = strtoul(s, &e, 8);
    4848        if (*e || (tmp > 07777U)) { /* Check range and trailing chars. */
    49             return 0;
     49            return -1;
    5050        }
    51         *current_mode = tmp;
    52         return 1;
     51        return tmp;
    5352    }
    5453
    55     new_mode = *current_mode;
     54    new_mode = current_mode;
    5655
    5756    /* Note: we allow empty clauses, and hence empty modes.
     
    7271                wholist |= who_mask[(int)(p-who_chars)];
    7372                if (!*++s) {
    74                     return 0;
     73                    return -1;
    7574                }
    7675                goto WHO_LIST;
     
    8180            if ((*s != '+') && (*s != '-')) {
    8281                if (*s != '=') {
    83                     return 0;
     82                    return -1;
    8483                }
    8584                /* Since op is '=', clear all bits corresponding to the
     
    146145    }
    147146
    148     *current_mode = new_mode;
    149     return 1;
     147    return new_mode;
    150148}
Note: See TracChangeset for help on using the changeset viewer.