| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/bash/src/builtins/umask.def |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||||||||||||||
| 7 | - | |||||||||||||||||||||||||||||||||||||
| 8 | - | |||||||||||||||||||||||||||||||||||||
| 9 | - | |||||||||||||||||||||||||||||||||||||
| 10 | - | |||||||||||||||||||||||||||||||||||||
| 11 | - | |||||||||||||||||||||||||||||||||||||
| 12 | - | |||||||||||||||||||||||||||||||||||||
| 13 | - | |||||||||||||||||||||||||||||||||||||
| 14 | - | |||||||||||||||||||||||||||||||||||||
| 15 | - | |||||||||||||||||||||||||||||||||||||
| 16 | - | |||||||||||||||||||||||||||||||||||||
| 17 | - | |||||||||||||||||||||||||||||||||||||
| 18 | static void print_symbolic_umask (mode_t); | - | ||||||||||||||||||||||||||||||||||||
| 19 | static int symbolic_umask (WORD_LIST *); | - | ||||||||||||||||||||||||||||||||||||
| 20 | - | |||||||||||||||||||||||||||||||||||||
| 21 | - | |||||||||||||||||||||||||||||||||||||
| 22 | - | |||||||||||||||||||||||||||||||||||||
| 23 | int | - | ||||||||||||||||||||||||||||||||||||
| 24 | umask_builtin (list) | - | ||||||||||||||||||||||||||||||||||||
| 25 | WORD_LIST *list; | - | ||||||||||||||||||||||||||||||||||||
| 26 | { | - | ||||||||||||||||||||||||||||||||||||
| 27 | int print_symbolically, opt, umask_value, pflag; | - | ||||||||||||||||||||||||||||||||||||
| 28 | mode_t umask_arg; | - | ||||||||||||||||||||||||||||||||||||
| 29 | - | |||||||||||||||||||||||||||||||||||||
| 30 | print_symbolically = pflag = 0; | - | ||||||||||||||||||||||||||||||||||||
| 31 | reset_internal_getopt (); | - | ||||||||||||||||||||||||||||||||||||
| 32 | while ((
| 78-121 | ||||||||||||||||||||||||||||||||||||
| 33 | { | - | ||||||||||||||||||||||||||||||||||||
| 34 | switch (opt) | - | ||||||||||||||||||||||||||||||||||||
| 35 | { | - | ||||||||||||||||||||||||||||||||||||
| 36 | case executed 55 times by 1 test: 'S':case 'S':Executed by:
executed 55 times by 1 test: case 'S':Executed by:
| 55 | ||||||||||||||||||||||||||||||||||||
| 37 | print_symbolically++; | - | ||||||||||||||||||||||||||||||||||||
| 38 | break; executed 55 times by 1 test: break;Executed by:
| 55 | ||||||||||||||||||||||||||||||||||||
| 39 | case executed 18 times by 1 test: 'p':case 'p':Executed by:
executed 18 times by 1 test: case 'p':Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||
| 40 | pflag++; | - | ||||||||||||||||||||||||||||||||||||
| 41 | break; executed 18 times by 1 test: break;Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||
| 42 | case never executed: -99:case -99:never executed: builtin_help (); returncase -99:never executed: (258);return (258);never executed: return (258); | 0 | ||||||||||||||||||||||||||||||||||||
| 43 | default executed 5 times by 1 test: :default:Executed by:
executed 5 times by 1 test: default:Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
| 44 | builtin_usage (); | - | ||||||||||||||||||||||||||||||||||||
| 45 | return executed 5 times by 1 test: (258);return (258);Executed by:
executed 5 times by 1 test: return (258);Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
| 46 | } | - | ||||||||||||||||||||||||||||||||||||
| 47 | } | - | ||||||||||||||||||||||||||||||||||||
| 48 | - | |||||||||||||||||||||||||||||||||||||
| 49 | list = loptend; | - | ||||||||||||||||||||||||||||||||||||
| 50 | - | |||||||||||||||||||||||||||||||||||||
| 51 | if (list
| 55-66 | ||||||||||||||||||||||||||||||||||||
| 52 | { | - | ||||||||||||||||||||||||||||||||||||
| 53 | if (((*
| 0-55 | ||||||||||||||||||||||||||||||||||||
| 54 | { | - | ||||||||||||||||||||||||||||||||||||
| 55 | umask_value = read_octal (list->word->word); | - | ||||||||||||||||||||||||||||||||||||
| 56 | - | |||||||||||||||||||||||||||||||||||||
| 57 | - | |||||||||||||||||||||||||||||||||||||
| 58 | - | |||||||||||||||||||||||||||||||||||||
| 59 | - | |||||||||||||||||||||||||||||||||||||
| 60 | - | |||||||||||||||||||||||||||||||||||||
| 61 | if (umask_value == -1
| 5-27 | ||||||||||||||||||||||||||||||||||||
| 62 | { | - | ||||||||||||||||||||||||||||||||||||
| 63 | sh_erange (list->word->word, | - | ||||||||||||||||||||||||||||||||||||
| 64 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||
| 65 | "octal number" | - | ||||||||||||||||||||||||||||||||||||
| 66 | , 5) | - | ||||||||||||||||||||||||||||||||||||
| 67 | ); | - | ||||||||||||||||||||||||||||||||||||
| 68 | return executed 5 times by 1 test: (1);return (1);Executed by:
executed 5 times by 1 test: return (1);Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
| 69 | } | - | ||||||||||||||||||||||||||||||||||||
| 70 | } executed 27 times by 1 test: end of blockExecuted by:
| 27 | ||||||||||||||||||||||||||||||||||||
| 71 | else | - | ||||||||||||||||||||||||||||||||||||
| 72 | { | - | ||||||||||||||||||||||||||||||||||||
| 73 | umask_value = symbolic_umask (list); | - | ||||||||||||||||||||||||||||||||||||
| 74 | if (umask_value == -1
| 9-14 | ||||||||||||||||||||||||||||||||||||
| 75 | return executed 14 times by 1 test: (1);return (1);Executed by:
executed 14 times by 1 test: return (1);Executed by:
| 14 | ||||||||||||||||||||||||||||||||||||
| 76 | } executed 9 times by 1 test: end of blockExecuted by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 77 | umask_arg = (mode_t)umask_value; | - | ||||||||||||||||||||||||||||||||||||
| 78 | umask (umask_arg); | - | ||||||||||||||||||||||||||||||||||||
| 79 | if (print_symbolically
| 9-27 | ||||||||||||||||||||||||||||||||||||
| 80 | print_symbolic_umask (umask_arg); executed 9 times by 1 test: print_symbolic_umask (umask_arg);Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 81 | } executed 36 times by 1 test: end of blockExecuted by:
| 36 | ||||||||||||||||||||||||||||||||||||
| 82 | else | - | ||||||||||||||||||||||||||||||||||||
| 83 | { | - | ||||||||||||||||||||||||||||||||||||
| 84 | umask_arg = umask (022); | - | ||||||||||||||||||||||||||||||||||||
| 85 | umask (umask_arg); | - | ||||||||||||||||||||||||||||||||||||
| 86 | - | |||||||||||||||||||||||||||||||||||||
| 87 | if (pflag
| 18-48 | ||||||||||||||||||||||||||||||||||||
| 88 | printf ("umask%s ", (print_symbolically ? " -S" : "")); executed 18 times by 1 test: printf ("umask%s ", (print_symbolically ? " -S" : ""));Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||
| 89 | if (print_symbolically
| 30-36 | ||||||||||||||||||||||||||||||||||||
| 90 | print_symbolic_umask (umask_arg); executed 36 times by 1 test: print_symbolic_umask (umask_arg);Executed by:
| 36 | ||||||||||||||||||||||||||||||||||||
| 91 | else | - | ||||||||||||||||||||||||||||||||||||
| 92 | printf ("%04lo\n", (unsigned long)umask_arg); executed 30 times by 1 test: printf ("%04lo\n", (unsigned long)umask_arg);Executed by:
| 30 | ||||||||||||||||||||||||||||||||||||
| 93 | } | - | ||||||||||||||||||||||||||||||||||||
| 94 | - | |||||||||||||||||||||||||||||||||||||
| 95 | return executed 102 times by 1 test: (sh_chkwrite (0));return (sh_chkwrite (0));Executed by:
executed 102 times by 1 test: return (sh_chkwrite (0));Executed by:
| 102 | ||||||||||||||||||||||||||||||||||||
| 96 | } | - | ||||||||||||||||||||||||||||||||||||
| 97 | - | |||||||||||||||||||||||||||||||||||||
| 98 | - | |||||||||||||||||||||||||||||||||||||
| 99 | - | |||||||||||||||||||||||||||||||||||||
| 100 | static void | - | ||||||||||||||||||||||||||||||||||||
| 101 | - | |||||||||||||||||||||||||||||||||||||
| 102 | print_symbolic_umask (mode_t um) | - | ||||||||||||||||||||||||||||||||||||
| 103 | - | |||||||||||||||||||||||||||||||||||||
| 104 | - | |||||||||||||||||||||||||||||||||||||
| 105 | - | |||||||||||||||||||||||||||||||||||||
| 106 | - | |||||||||||||||||||||||||||||||||||||
| 107 | { | - | ||||||||||||||||||||||||||||||||||||
| 108 | char ubits[4], gbits[4], obits[4]; | - | ||||||||||||||||||||||||||||||||||||
| 109 | int i; | - | ||||||||||||||||||||||||||||||||||||
| 110 | - | |||||||||||||||||||||||||||||||||||||
| 111 | i = 0; | - | ||||||||||||||||||||||||||||||||||||
| 112 | if ((
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 113 | 0400
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 114 | ) == 0
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 115 | ubits[i++] = 'r'; executed 45 times by 1 test: ubits[i++] = 'r';Executed by:
| 45 | ||||||||||||||||||||||||||||||||||||
| 116 | if ((
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 117 | 0200
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 118 | ) == 0
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 119 | ubits[i++] = 'w'; executed 45 times by 1 test: ubits[i++] = 'w';Executed by:
| 45 | ||||||||||||||||||||||||||||||||||||
| 120 | if ((
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 121 | 0100
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 122 | ) == 0
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 123 | ubits[i++] = 'x'; executed 45 times by 1 test: ubits[i++] = 'x';Executed by:
| 45 | ||||||||||||||||||||||||||||||||||||
| 124 | ubits[i] = '\0'; | - | ||||||||||||||||||||||||||||||||||||
| 125 | - | |||||||||||||||||||||||||||||||||||||
| 126 | i = 0; | - | ||||||||||||||||||||||||||||||||||||
| 127 | if ((
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 128 | (0400 >> 3)
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 129 | ) == 0
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 130 | gbits[i++] = 'r'; executed 45 times by 1 test: gbits[i++] = 'r';Executed by:
| 45 | ||||||||||||||||||||||||||||||||||||
| 131 | if ((
| 9-36 | ||||||||||||||||||||||||||||||||||||
| 132 | (0200 >> 3)
| 9-36 | ||||||||||||||||||||||||||||||||||||
| 133 | ) == 0
| 9-36 | ||||||||||||||||||||||||||||||||||||
| 134 | gbits[i++] = 'w'; executed 36 times by 1 test: gbits[i++] = 'w';Executed by:
| 36 | ||||||||||||||||||||||||||||||||||||
| 135 | if ((
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 136 | (0100 >> 3)
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 137 | ) == 0
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 138 | gbits[i++] = 'x'; executed 45 times by 1 test: gbits[i++] = 'x';Executed by:
| 45 | ||||||||||||||||||||||||||||||||||||
| 139 | gbits[i] = '\0'; | - | ||||||||||||||||||||||||||||||||||||
| 140 | - | |||||||||||||||||||||||||||||||||||||
| 141 | i = 0; | - | ||||||||||||||||||||||||||||||||||||
| 142 | if ((
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 143 | ((0400 >> 3) >> 3)
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 144 | ) == 0
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 145 | obits[i++] = 'r'; executed 45 times by 1 test: obits[i++] = 'r';Executed by:
| 45 | ||||||||||||||||||||||||||||||||||||
| 146 | if ((
| 9-36 | ||||||||||||||||||||||||||||||||||||
| 147 | ((0200 >> 3) >> 3)
| 9-36 | ||||||||||||||||||||||||||||||||||||
| 148 | ) == 0
| 9-36 | ||||||||||||||||||||||||||||||||||||
| 149 | obits[i++] = 'w'; executed 9 times by 1 test: obits[i++] = 'w';Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 150 | if ((
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 151 | ((0100 >> 3) >> 3)
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 152 | ) == 0
| 0-45 | ||||||||||||||||||||||||||||||||||||
| 153 | obits[i++] = 'x'; executed 45 times by 1 test: obits[i++] = 'x';Executed by:
| 45 | ||||||||||||||||||||||||||||||||||||
| 154 | obits[i] = '\0'; | - | ||||||||||||||||||||||||||||||||||||
| 155 | - | |||||||||||||||||||||||||||||||||||||
| 156 | printf ("u=%s,g=%s,o=%s\n", ubits, gbits, obits); | - | ||||||||||||||||||||||||||||||||||||
| 157 | } executed 45 times by 1 test: end of blockExecuted by:
| 45 | ||||||||||||||||||||||||||||||||||||
| 158 | - | |||||||||||||||||||||||||||||||||||||
| 159 | int | - | ||||||||||||||||||||||||||||||||||||
| 160 | parse_symbolic_mode (mode, initial_bits) | - | ||||||||||||||||||||||||||||||||||||
| 161 | char *mode; | - | ||||||||||||||||||||||||||||||||||||
| 162 | int initial_bits; | - | ||||||||||||||||||||||||||||||||||||
| 163 | { | - | ||||||||||||||||||||||||||||||||||||
| 164 | int who, op, perm, bits, c; | - | ||||||||||||||||||||||||||||||||||||
| 165 | char *s; | - | ||||||||||||||||||||||||||||||||||||
| 166 | - | |||||||||||||||||||||||||||||||||||||
| 167 | for (s = mode, bits = initial_bits;;) | - | ||||||||||||||||||||||||||||||||||||
| 168 | { | - | ||||||||||||||||||||||||||||||||||||
| 169 | who = op = perm = 0; | - | ||||||||||||||||||||||||||||||||||||
| 170 | - | |||||||||||||||||||||||||||||||||||||
| 171 | - | |||||||||||||||||||||||||||||||||||||
| 172 | while (((*
| 0-82 | ||||||||||||||||||||||||||||||||||||
| 173 | ((void *)0)
| 41 | ||||||||||||||||||||||||||||||||||||
| 174 | ) : 0)
| 41 | ||||||||||||||||||||||||||||||||||||
| 175 | { | - | ||||||||||||||||||||||||||||||||||||
| 176 | switch (c = *s++) | - | ||||||||||||||||||||||||||||||||||||
| 177 | { | - | ||||||||||||||||||||||||||||||||||||
| 178 | case executed 19 times by 1 test: 'u':case 'u':Executed by:
executed 19 times by 1 test: case 'u':Executed by:
| 19 | ||||||||||||||||||||||||||||||||||||
| 179 | who |= | - | ||||||||||||||||||||||||||||||||||||
| 180 | (0400|0200|0100) | - | ||||||||||||||||||||||||||||||||||||
| 181 | ; | - | ||||||||||||||||||||||||||||||||||||
| 182 | continue; executed 19 times by 1 test: continue;Executed by:
| 19 | ||||||||||||||||||||||||||||||||||||
| 183 | case executed 13 times by 1 test: 'g':case 'g':Executed by:
executed 13 times by 1 test: case 'g':Executed by:
| 13 | ||||||||||||||||||||||||||||||||||||
| 184 | who |= | - | ||||||||||||||||||||||||||||||||||||
| 185 | ((0400|0200|0100) >> 3) | - | ||||||||||||||||||||||||||||||||||||
| 186 | ; | - | ||||||||||||||||||||||||||||||||||||
| 187 | continue; executed 13 times by 1 test: continue;Executed by:
| 13 | ||||||||||||||||||||||||||||||||||||
| 188 | case executed 9 times by 1 test: 'o':case 'o':Executed by:
executed 9 times by 1 test: case 'o':Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 189 | who |= | - | ||||||||||||||||||||||||||||||||||||
| 190 | (((0400|0200|0100) >> 3) >> 3) | - | ||||||||||||||||||||||||||||||||||||
| 191 | ; | - | ||||||||||||||||||||||||||||||||||||
| 192 | continue; executed 9 times by 1 test: continue;Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 193 | case never executed: 'a':case 'a':never executed: case 'a': | 0 | ||||||||||||||||||||||||||||||||||||
| 194 | who |= | - | ||||||||||||||||||||||||||||||||||||
| 195 | (0400|0200|0100) | - | ||||||||||||||||||||||||||||||||||||
| 196 | | | - | ||||||||||||||||||||||||||||||||||||
| 197 | ((0400|0200|0100) >> 3) | - | ||||||||||||||||||||||||||||||||||||
| 198 | | | - | ||||||||||||||||||||||||||||||||||||
| 199 | (((0400|0200|0100) >> 3) >> 3) | - | ||||||||||||||||||||||||||||||||||||
| 200 | ; | - | ||||||||||||||||||||||||||||||||||||
| 201 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||
| 202 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||
| 203 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
| 204 | } | - | ||||||||||||||||||||||||||||||||||||
| 205 | } | - | ||||||||||||||||||||||||||||||||||||
| 206 | - | |||||||||||||||||||||||||||||||||||||
| 207 | - | |||||||||||||||||||||||||||||||||||||
| 208 | op = *s++; | - | ||||||||||||||||||||||||||||||||||||
| 209 | switch (op) | - | ||||||||||||||||||||||||||||||||||||
| 210 | { | - | ||||||||||||||||||||||||||||||||||||
| 211 | case never executed: '+':case '+':never executed: case '+': | 0 | ||||||||||||||||||||||||||||||||||||
| 212 | case never executed: '-':case '-':never executed: case '-': | 0 | ||||||||||||||||||||||||||||||||||||
| 213 | case executed 36 times by 1 test: '=':case '=':Executed by:
executed 36 times by 1 test: case '=':Executed by:
| 36 | ||||||||||||||||||||||||||||||||||||
| 214 | break; executed 36 times by 1 test: break;Executed by:
| 36 | ||||||||||||||||||||||||||||||||||||
| 215 | default executed 5 times by 1 test: :default:Executed by:
executed 5 times by 1 test: default:Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
| 216 | builtin_error ( | - | ||||||||||||||||||||||||||||||||||||
| 217 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||
| 218 | "`%c': invalid symbolic mode operator" | - | ||||||||||||||||||||||||||||||||||||
| 219 | , 5) | - | ||||||||||||||||||||||||||||||||||||
| 220 | , op); | - | ||||||||||||||||||||||||||||||||||||
| 221 | return executed 5 times by 1 test: (-1);return (-1);Executed by:
executed 5 times by 1 test: return (-1);Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||
| 222 | } | - | ||||||||||||||||||||||||||||||||||||
| 223 | - | |||||||||||||||||||||||||||||||||||||
| 224 | - | |||||||||||||||||||||||||||||||||||||
| 225 | while (((*
| 9-114 | ||||||||||||||||||||||||||||||||||||
| 226 | ((void *)0)
| 36-87 | ||||||||||||||||||||||||||||||||||||
| 227 | ) : 0)
| 36-87 | ||||||||||||||||||||||||||||||||||||
| 228 | { | - | ||||||||||||||||||||||||||||||||||||
| 229 | c = *s++; | - | ||||||||||||||||||||||||||||||||||||
| 230 | - | |||||||||||||||||||||||||||||||||||||
| 231 | switch (c) | - | ||||||||||||||||||||||||||||||||||||
| 232 | { | - | ||||||||||||||||||||||||||||||||||||
| 233 | case executed 32 times by 1 test: 'r':case 'r':Executed by:
executed 32 times by 1 test: case 'r':Executed by:
| 32 | ||||||||||||||||||||||||||||||||||||
| 234 | perm |= ( | - | ||||||||||||||||||||||||||||||||||||
| 235 | 0400 | - | ||||||||||||||||||||||||||||||||||||
| 236 | | | - | ||||||||||||||||||||||||||||||||||||
| 237 | (0400 >> 3) | - | ||||||||||||||||||||||||||||||||||||
| 238 | | | - | ||||||||||||||||||||||||||||||||||||
| 239 | ((0400 >> 3) >> 3) | - | ||||||||||||||||||||||||||||||||||||
| 240 | ); | - | ||||||||||||||||||||||||||||||||||||
| 241 | break; executed 32 times by 1 test: break;Executed by:
| 32 | ||||||||||||||||||||||||||||||||||||
| 242 | case executed 23 times by 1 test: 'w':case 'w':Executed by:
executed 23 times by 1 test: case 'w':Executed by:
| 23 | ||||||||||||||||||||||||||||||||||||
| 243 | perm |= ( | - | ||||||||||||||||||||||||||||||||||||
| 244 | 0200 | - | ||||||||||||||||||||||||||||||||||||
| 245 | | | - | ||||||||||||||||||||||||||||||||||||
| 246 | (0200 >> 3) | - | ||||||||||||||||||||||||||||||||||||
| 247 | | | - | ||||||||||||||||||||||||||||||||||||
| 248 | ((0200 >> 3) >> 3) | - | ||||||||||||||||||||||||||||||||||||
| 249 | ); | - | ||||||||||||||||||||||||||||||||||||
| 250 | break; executed 23 times by 1 test: break;Executed by:
| 23 | ||||||||||||||||||||||||||||||||||||
| 251 | case executed 32 times by 1 test: 'x':case 'x':Executed by:
executed 32 times by 1 test: case 'x':Executed by:
| 32 | ||||||||||||||||||||||||||||||||||||
| 252 | perm |= ( | - | ||||||||||||||||||||||||||||||||||||
| 253 | 0100 | - | ||||||||||||||||||||||||||||||||||||
| 254 | | | - | ||||||||||||||||||||||||||||||||||||
| 255 | (0100 >> 3) | - | ||||||||||||||||||||||||||||||||||||
| 256 | | | - | ||||||||||||||||||||||||||||||||||||
| 257 | ((0100 >> 3) >> 3) | - | ||||||||||||||||||||||||||||||||||||
| 258 | ); | - | ||||||||||||||||||||||||||||||||||||
| 259 | break; executed 32 times by 1 test: break;Executed by:
| 32 | ||||||||||||||||||||||||||||||||||||
| 260 | } | - | ||||||||||||||||||||||||||||||||||||
| 261 | } executed 87 times by 1 test: end of blockExecuted by:
| 87 | ||||||||||||||||||||||||||||||||||||
| 262 | - | |||||||||||||||||||||||||||||||||||||
| 263 | - | |||||||||||||||||||||||||||||||||||||
| 264 | - | |||||||||||||||||||||||||||||||||||||
| 265 | if (!*s
| 9-27 | ||||||||||||||||||||||||||||||||||||
| 266 | { | - | ||||||||||||||||||||||||||||||||||||
| 267 | if (who
| 0-27 | ||||||||||||||||||||||||||||||||||||
| 268 | perm &= who; executed 27 times by 1 test: perm &= who;Executed by:
| 27 | ||||||||||||||||||||||||||||||||||||
| 269 | - | |||||||||||||||||||||||||||||||||||||
| 270 | switch (op) | - | ||||||||||||||||||||||||||||||||||||
| 271 | { | - | ||||||||||||||||||||||||||||||||||||
| 272 | case never executed: '+':case '+':never executed: case '+': | 0 | ||||||||||||||||||||||||||||||||||||
| 273 | bits |= perm; | - | ||||||||||||||||||||||||||||||||||||
| 274 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
| 275 | case never executed: '-':case '-':never executed: case '-': | 0 | ||||||||||||||||||||||||||||||||||||
| 276 | bits &= ~perm; | - | ||||||||||||||||||||||||||||||||||||
| 277 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||
| 278 | case executed 27 times by 1 test: '=':case '=':Executed by:
executed 27 times by 1 test: case '=':Executed by:
| 27 | ||||||||||||||||||||||||||||||||||||
| 279 | if (who == 0
| 0-27 | ||||||||||||||||||||||||||||||||||||
| 280 | who = never executed: who = (0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 281 | (0400|0200|0100) never executed: who = (0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 282 | | never executed: who = (0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 283 | ((0400|0200|0100) >> 3) never executed: who = (0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 284 | | never executed: who = (0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 285 | (((0400|0200|0100) >> 3) >> 3) never executed: who = (0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 286 | ; never executed: who = (0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 287 | bits &= ~who; | - | ||||||||||||||||||||||||||||||||||||
| 288 | bits |= perm; | - | ||||||||||||||||||||||||||||||||||||
| 289 | break; executed 27 times by 1 test: break;Executed by:
| 27 | ||||||||||||||||||||||||||||||||||||
| 290 | - | |||||||||||||||||||||||||||||||||||||
| 291 | - | |||||||||||||||||||||||||||||||||||||
| 292 | } | - | ||||||||||||||||||||||||||||||||||||
| 293 | - | |||||||||||||||||||||||||||||||||||||
| 294 | if (*
| 9-18 | ||||||||||||||||||||||||||||||||||||
| 295 | break; executed 9 times by 1 test: break;Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 296 | else | - | ||||||||||||||||||||||||||||||||||||
| 297 | s++; executed 18 times by 1 test: s++;Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||
| 298 | } | - | ||||||||||||||||||||||||||||||||||||
| 299 | else | - | ||||||||||||||||||||||||||||||||||||
| 300 | { | - | ||||||||||||||||||||||||||||||||||||
| 301 | builtin_error ( | - | ||||||||||||||||||||||||||||||||||||
| 302 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||
| 303 | "`%c': invalid symbolic mode character" | - | ||||||||||||||||||||||||||||||||||||
| 304 | , 5) | - | ||||||||||||||||||||||||||||||||||||
| 305 | , *s); | - | ||||||||||||||||||||||||||||||||||||
| 306 | return executed 9 times by 1 test: (-1);return (-1);Executed by:
executed 9 times by 1 test: return (-1);Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 307 | } | - | ||||||||||||||||||||||||||||||||||||
| 308 | } | - | ||||||||||||||||||||||||||||||||||||
| 309 | - | |||||||||||||||||||||||||||||||||||||
| 310 | return executed 9 times by 1 test: (bits);return (bits);Executed by:
executed 9 times by 1 test: return (bits);Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 311 | } | - | ||||||||||||||||||||||||||||||||||||
| 312 | - | |||||||||||||||||||||||||||||||||||||
| 313 | - | |||||||||||||||||||||||||||||||||||||
| 314 | - | |||||||||||||||||||||||||||||||||||||
| 315 | - | |||||||||||||||||||||||||||||||||||||
| 316 | static int | - | ||||||||||||||||||||||||||||||||||||
| 317 | symbolic_umask (list) | - | ||||||||||||||||||||||||||||||||||||
| 318 | WORD_LIST *list; | - | ||||||||||||||||||||||||||||||||||||
| 319 | { | - | ||||||||||||||||||||||||||||||||||||
| 320 | int um, bits; | - | ||||||||||||||||||||||||||||||||||||
| 321 | - | |||||||||||||||||||||||||||||||||||||
| 322 | - | |||||||||||||||||||||||||||||||||||||
| 323 | um = umask (022); | - | ||||||||||||||||||||||||||||||||||||
| 324 | umask (um); | - | ||||||||||||||||||||||||||||||||||||
| 325 | - | |||||||||||||||||||||||||||||||||||||
| 326 | - | |||||||||||||||||||||||||||||||||||||
| 327 | - | |||||||||||||||||||||||||||||||||||||
| 328 | - | |||||||||||||||||||||||||||||||||||||
| 329 | bits = parse_symbolic_mode (list->word->word, ~um & 0777); | - | ||||||||||||||||||||||||||||||||||||
| 330 | if (bits == -1
| 9-14 | ||||||||||||||||||||||||||||||||||||
| 331 | return executed 14 times by 1 test: (-1);return (-1);Executed by:
executed 14 times by 1 test: return (-1);Executed by:
| 14 | ||||||||||||||||||||||||||||||||||||
| 332 | - | |||||||||||||||||||||||||||||||||||||
| 333 | um = ~bits & 0777; | - | ||||||||||||||||||||||||||||||||||||
| 334 | return executed 9 times by 1 test: (um);return (um);Executed by:
executed 9 times by 1 test: return (um);Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 335 | } | - | ||||||||||||||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |