Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/libbb/parse_mode.c
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/libbb/parse_mode.c
r1765 r2725 5 5 * Copyright (C) 2003 Manuel Novoa III <mjn3@codepoet.org> 6 6 * 7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 8 */ 9 9 … … 16 16 #define FILEMODEBITS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) 17 17 18 int bb_parse_mode(const char *s, mode_t *current_mode)18 int FAST_FUNC bb_parse_mode(const char *s, mode_t *current_mode) 19 19 { 20 20 static const mode_t who_mask[] = { … … 41 41 char op; 42 42 43 if (( (unsigned int)(*s - '0')) < 8) {43 if ((unsigned char)(*s - '0') < 8) { 44 44 unsigned long tmp; 45 45 char *e; … … 58 58 * We treat an empty mode as no change to perms. */ 59 59 60 while (*s) { 61 if (*s == ',') { 60 while (*s) { /* Process clauses. */ 61 if (*s == ',') { /* We allow empty clauses. */ 62 62 ++s; 63 63 continue; … … 78 78 } while (*++p); 79 79 80 do { 80 do { /* Process action list. */ 81 81 if ((*s != '+') && (*s != '-')) { 82 82 if (*s != '=') { … … 94 94 95 95 /* Check for permcopy. */ 96 p = who_chars + 1; 96 p = who_chars + 1; /* Skip 'a' entry. */ 97 97 do { 98 98 if (*p == *s) { … … 129 129 } while (*++p); 130 130 GOT_ACTION: 131 if (permlist) { 131 if (permlist) { /* The permlist was nonempty. */ 132 132 mode_t tmp = wholist; 133 133 if (!wholist) {
Note:
See TracChangeset
for help on using the changeset viewer.