| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/src/mkdir.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | - | |||||||||||||
| 6 | - | |||||||||||||
| 7 | - | |||||||||||||
| 8 | - | |||||||||||||
| 9 | static struct option const longopts[] = | - | ||||||||||||
| 10 | { | - | ||||||||||||
| 11 | {"context", | - | ||||||||||||
| 12 | 2 | - | ||||||||||||
| 13 | , | - | ||||||||||||
| 14 | ((void *)0) | - | ||||||||||||
| 15 | , 'Z'}, | - | ||||||||||||
| 16 | {"mode", | - | ||||||||||||
| 17 | 1 | - | ||||||||||||
| 18 | , | - | ||||||||||||
| 19 | ((void *)0) | - | ||||||||||||
| 20 | , 'm'}, | - | ||||||||||||
| 21 | {"parents", | - | ||||||||||||
| 22 | 0 | - | ||||||||||||
| 23 | , | - | ||||||||||||
| 24 | ((void *)0) | - | ||||||||||||
| 25 | , 'p'}, | - | ||||||||||||
| 26 | {"verbose", | - | ||||||||||||
| 27 | 0 | - | ||||||||||||
| 28 | , | - | ||||||||||||
| 29 | ((void *)0) | - | ||||||||||||
| 30 | , 'v'}, | - | ||||||||||||
| 31 | {"help", | - | ||||||||||||
| 32 | 0 | - | ||||||||||||
| 33 | , | - | ||||||||||||
| 34 | ((void *)0) | - | ||||||||||||
| 35 | , GETOPT_HELP_CHAR}, | - | ||||||||||||
| 36 | {"version", | - | ||||||||||||
| 37 | 0 | - | ||||||||||||
| 38 | , | - | ||||||||||||
| 39 | ((void *)0) | - | ||||||||||||
| 40 | , GETOPT_VERSION_CHAR}, | - | ||||||||||||
| 41 | { | - | ||||||||||||
| 42 | ((void *)0) | - | ||||||||||||
| 43 | , 0, | - | ||||||||||||
| 44 | ((void *)0) | - | ||||||||||||
| 45 | , 0} | - | ||||||||||||
| 46 | }; | - | ||||||||||||
| 47 | - | |||||||||||||
| 48 | void | - | ||||||||||||
| 49 | usage (int status) | - | ||||||||||||
| 50 | { | - | ||||||||||||
| 51 | if (status !=
| 1-2 | ||||||||||||
| 52 | 0
| 1-2 | ||||||||||||
| 53 | ) | - | ||||||||||||
| 54 | do { fprintf ( | - | ||||||||||||
| 55 | stderr | - | ||||||||||||
| 56 | , | - | ||||||||||||
| 57 | dcgettext (((void *)0), | - | ||||||||||||
| 58 | "Try '%s --help' for more information.\n" | - | ||||||||||||
| 59 | , 5) | - | ||||||||||||
| 60 | , program_name); } executed 1 time by 1 test: while (0);end of blockExecuted by:
| 1 | ||||||||||||
| 61 | else | - | ||||||||||||
| 62 | { | - | ||||||||||||
| 63 | printf ( | - | ||||||||||||
| 64 | dcgettext (((void *)0), | - | ||||||||||||
| 65 | "Usage: %s [OPTION]... DIRECTORY...\n" | - | ||||||||||||
| 66 | , 5) | - | ||||||||||||
| 67 | , program_name); | - | ||||||||||||
| 68 | fputs_unlocked ( | - | ||||||||||||
| 69 | dcgettext (((void *)0), | - | ||||||||||||
| 70 | "Create the DIRECTORY(ies), if they do not already exist.\n" | - | ||||||||||||
| 71 | , 5) | - | ||||||||||||
| 72 | , | - | ||||||||||||
| 73 | stdout | - | ||||||||||||
| 74 | ) | - | ||||||||||||
| 75 | - | |||||||||||||
| 76 | ; | - | ||||||||||||
| 77 | - | |||||||||||||
| 78 | emit_mandatory_arg_note (); | - | ||||||||||||
| 79 | - | |||||||||||||
| 80 | fputs_unlocked ( | - | ||||||||||||
| 81 | dcgettext (((void *)0), | - | ||||||||||||
| 82 | " -m, --mode=MODE set file mode (as in chmod), not a=rwx - umask\n -p, --parents no error if existing, make parent directories as needed\n -v, --verbose print a message for each created directory\n" | - | ||||||||||||
| 83 | , 5) | - | ||||||||||||
| 84 | , | - | ||||||||||||
| 85 | stdout | - | ||||||||||||
| 86 | ) | - | ||||||||||||
| 87 | - | |||||||||||||
| 88 | - | |||||||||||||
| 89 | - | |||||||||||||
| 90 | ; | - | ||||||||||||
| 91 | fputs_unlocked ( | - | ||||||||||||
| 92 | dcgettext (((void *)0), | - | ||||||||||||
| 93 | " -Z set SELinux security context of each created directory\n to the default type\n --context[=CTX] like -Z, or if CTX is specified then set the SELinux\n or SMACK security context to CTX\n" | - | ||||||||||||
| 94 | , 5) | - | ||||||||||||
| 95 | , | - | ||||||||||||
| 96 | stdout | - | ||||||||||||
| 97 | ) | - | ||||||||||||
| 98 | - | |||||||||||||
| 99 | - | |||||||||||||
| 100 | - | |||||||||||||
| 101 | - | |||||||||||||
| 102 | ; | - | ||||||||||||
| 103 | fputs_unlocked ( | - | ||||||||||||
| 104 | dcgettext (((void *)0), | - | ||||||||||||
| 105 | " --help display this help and exit\n" | - | ||||||||||||
| 106 | , 5) | - | ||||||||||||
| 107 | , | - | ||||||||||||
| 108 | stdout | - | ||||||||||||
| 109 | ); | - | ||||||||||||
| 110 | fputs_unlocked ( | - | ||||||||||||
| 111 | dcgettext (((void *)0), | - | ||||||||||||
| 112 | " --version output version information and exit\n" | - | ||||||||||||
| 113 | , 5) | - | ||||||||||||
| 114 | , | - | ||||||||||||
| 115 | stdout | - | ||||||||||||
| 116 | ); | - | ||||||||||||
| 117 | emit_ancillary_info ("mkdir"); | - | ||||||||||||
| 118 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||
| 119 | exit (status); executed 3 times by 1 test: exit (status);Executed by:
| 3 | ||||||||||||
| 120 | } | - | ||||||||||||
| 121 | - | |||||||||||||
| 122 | - | |||||||||||||
| 123 | struct mkdir_options | - | ||||||||||||
| 124 | { | - | ||||||||||||
| 125 | - | |||||||||||||
| 126 | - | |||||||||||||
| 127 | int (*make_ancestor_function) (char const *, char const *, void *); | - | ||||||||||||
| 128 | - | |||||||||||||
| 129 | - | |||||||||||||
| 130 | mode_t umask_value; | - | ||||||||||||
| 131 | - | |||||||||||||
| 132 | - | |||||||||||||
| 133 | mode_t mode; | - | ||||||||||||
| 134 | - | |||||||||||||
| 135 | - | |||||||||||||
| 136 | mode_t mode_bits; | - | ||||||||||||
| 137 | - | |||||||||||||
| 138 | - | |||||||||||||
| 139 | - | |||||||||||||
| 140 | _Bool | - | ||||||||||||
| 141 | set_security_context; | - | ||||||||||||
| 142 | - | |||||||||||||
| 143 | - | |||||||||||||
| 144 | char const *created_directory_format; | - | ||||||||||||
| 145 | }; | - | ||||||||||||
| 146 | - | |||||||||||||
| 147 | - | |||||||||||||
| 148 | static void | - | ||||||||||||
| 149 | announce_mkdir (char const *dir, void *options) | - | ||||||||||||
| 150 | { | - | ||||||||||||
| 151 | struct mkdir_options const *o = options; | - | ||||||||||||
| 152 | if (o->created_directory_format
| 0-22392 | ||||||||||||
| 153 | prog_fprintf ( never executed: prog_fprintf ( stdout , o->created_directory_format, quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 154 | stdout never executed: prog_fprintf ( stdout , o->created_directory_format, quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 155 | , o->created_directory_format, quotearg_style (shell_escape_always_quoting_style, dir)); never executed: prog_fprintf ( stdout , o->created_directory_format, quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 156 | } executed 22392 times by 1 test: end of blockExecuted by:
| 22392 | ||||||||||||
| 157 | - | |||||||||||||
| 158 | - | |||||||||||||
| 159 | - | |||||||||||||
| 160 | - | |||||||||||||
| 161 | - | |||||||||||||
| 162 | - | |||||||||||||
| 163 | static int | - | ||||||||||||
| 164 | make_ancestor (char const *dir, char const *component, void *options) | - | ||||||||||||
| 165 | { | - | ||||||||||||
| 166 | struct mkdir_options const *o = options; | - | ||||||||||||
| 167 | - | |||||||||||||
| 168 | if (o->set_security_context
| 0-12282 | ||||||||||||
| 169 | 0040000
| 0 | ||||||||||||
| 170 | ) < 0
| 0 | ||||||||||||
| 171 | && ! ignorable_ctx_err (
| 0 | ||||||||||||
| 172 | (*__errno_location ())
| 0 | ||||||||||||
| 173 | )
| 0 | ||||||||||||
| 174 | error (0, never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 175 | (*__errno_location ()) never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 176 | , never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 177 | dcgettext (((void *)0), never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 178 | "failed to set default creation context for %s" never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 179 | , 5) never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 180 | , never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 181 | quotearg_style (shell_escape_always_quoting_style, dir)); never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 182 | - | |||||||||||||
| 183 | mode_t user_wx = | - | ||||||||||||
| 184 | 0200 | - | ||||||||||||
| 185 | | | - | ||||||||||||
| 186 | 0100 | - | ||||||||||||
| 187 | ; | - | ||||||||||||
| 188 | - | |||||||||||||
| 189 | _Bool | - | ||||||||||||
| 190 | self_denying_umask = (o->umask_value & user_wx) != 0; | - | ||||||||||||
| 191 | if (self_denying_umask
| 0-12282 | ||||||||||||
| 192 | umask (o->umask_value & ~user_wx); never executed: umask (o->umask_value & ~user_wx); | 0 | ||||||||||||
| 193 | int r = mkdir (component, | - | ||||||||||||
| 194 | ((0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3)) | - | ||||||||||||
| 195 | ); | - | ||||||||||||
| 196 | if (self_denying_umask
| 0-12282 | ||||||||||||
| 197 | { | - | ||||||||||||
| 198 | int mkdir_errno = | - | ||||||||||||
| 199 | (*__errno_location ()) | - | ||||||||||||
| 200 | ; | - | ||||||||||||
| 201 | umask (o->umask_value); | - | ||||||||||||
| 202 | - | |||||||||||||
| 203 | (*__errno_location ()) | - | ||||||||||||
| 204 | = mkdir_errno; | - | ||||||||||||
| 205 | } never executed: end of block | 0 | ||||||||||||
| 206 | if (r == 0
| 158-12124 | ||||||||||||
| 207 | { | - | ||||||||||||
| 208 | r = (o->umask_value & | - | ||||||||||||
| 209 | 0400 | - | ||||||||||||
| 210 | ) != 0; | - | ||||||||||||
| 211 | announce_mkdir (dir, options); | - | ||||||||||||
| 212 | } executed 12124 times by 1 test: end of blockExecuted by:
| 12124 | ||||||||||||
| 213 | return executed 12282 times by 1 test: r;return r;Executed by:
executed 12282 times by 1 test: return r;Executed by:
| 12282 | ||||||||||||
| 214 | } | - | ||||||||||||
| 215 | - | |||||||||||||
| 216 | - | |||||||||||||
| 217 | static int | - | ||||||||||||
| 218 | process_dir (char *dir, struct savewd *wd, void *options) | - | ||||||||||||
| 219 | { | - | ||||||||||||
| 220 | struct mkdir_options const *o = options; | - | ||||||||||||
| 221 | - | |||||||||||||
| 222 | - | |||||||||||||
| 223 | if (o->set_security_context
| 0-10268 | ||||||||||||
| 224 | { | - | ||||||||||||
| 225 | if (! o->make_ancestor_function
| 0 | ||||||||||||
| 226 | 0040000
| 0 | ||||||||||||
| 227 | ) < 0
| 0 | ||||||||||||
| 228 | && ! ignorable_ctx_err (
| 0 | ||||||||||||
| 229 | (*__errno_location ())
| 0 | ||||||||||||
| 230 | )
| 0 | ||||||||||||
| 231 | error (0, never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 232 | (*__errno_location ()) never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 233 | , never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 234 | dcgettext (((void *)0), never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 235 | "failed to set default creation context for %s" never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 236 | , 5) never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 237 | , never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 238 | quotearg_style (shell_escape_always_quoting_style, dir)); never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to set default creation context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 239 | } never executed: end of block | 0 | ||||||||||||
| 240 | - | |||||||||||||
| 241 | int ret = (make_dir_parents (dir, wd, o->make_ancestor_function, options,
| 0-10268 | ||||||||||||
| 242 | o->mode, announce_mkdir,
| 0-10268 | ||||||||||||
| 243 | o->mode_bits, (uid_t) -1, (gid_t) -1,
| 0-10268 | ||||||||||||
| 244 | 1
| 0-10268 | ||||||||||||
| 245 | )
| 0-10268 | ||||||||||||
| 246 | ? | - | ||||||||||||
| 247 | 0 | - | ||||||||||||
| 248 | - | |||||||||||||
| 249 | : | - | ||||||||||||
| 250 | 1 | - | ||||||||||||
| 251 | ); | - | ||||||||||||
| 252 | - | |||||||||||||
| 253 | - | |||||||||||||
| 254 | - | |||||||||||||
| 255 | - | |||||||||||||
| 256 | - | |||||||||||||
| 257 | - | |||||||||||||
| 258 | if (ret ==
| 0-10268 | ||||||||||||
| 259 | 0
| 0-10268 | ||||||||||||
| 260 | && o->set_security_context
| 0-10268 | ||||||||||||
| 261 | && o->make_ancestor_function
| 0 | ||||||||||||
| 262 | { | - | ||||||||||||
| 263 | if (! restorecon (last_component (dir),
| 0 | ||||||||||||
| 264 | 0
| 0 | ||||||||||||
| 265 | ,
| 0 | ||||||||||||
| 266 | 0
| 0 | ||||||||||||
| 267 | )
| 0 | ||||||||||||
| 268 | && ! ignorable_ctx_err (
| 0 | ||||||||||||
| 269 | (*__errno_location ())
| 0 | ||||||||||||
| 270 | )
| 0 | ||||||||||||
| 271 | error (0, never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to restore context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 272 | (*__errno_location ()) never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to restore context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 273 | , never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to restore context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 274 | dcgettext (((void *)0), never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to restore context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 275 | "failed to restore context for %s" never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to restore context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 276 | , 5) never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to restore context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 277 | , never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to restore context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 278 | quotearg_style (shell_escape_always_quoting_style, dir)); never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "failed to restore context for %s" , 5) , quotearg_style (shell_escape_always_quoting_style, dir)); | 0 | ||||||||||||
| 279 | } never executed: end of block | 0 | ||||||||||||
| 280 | - | |||||||||||||
| 281 | return executed 10268 times by 1 test: ret;return ret;Executed by:
executed 10268 times by 1 test: return ret;Executed by:
| 10268 | ||||||||||||
| 282 | } | - | ||||||||||||
| 283 | - | |||||||||||||
| 284 | int | - | ||||||||||||
| 285 | main (int argc, char **argv) | - | ||||||||||||
| 286 | { | - | ||||||||||||
| 287 | const char *specified_mode = | - | ||||||||||||
| 288 | ((void *)0) | - | ||||||||||||
| 289 | ; | - | ||||||||||||
| 290 | int optc; | - | ||||||||||||
| 291 | char const *scontext = | - | ||||||||||||
| 292 | ((void *)0) | - | ||||||||||||
| 293 | ; | - | ||||||||||||
| 294 | struct mkdir_options options; | - | ||||||||||||
| 295 | - | |||||||||||||
| 296 | options.make_ancestor_function = | - | ||||||||||||
| 297 | ((void *)0) | - | ||||||||||||
| 298 | ; | - | ||||||||||||
| 299 | options.mode = | - | ||||||||||||
| 300 | ((0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3)) | - | ||||||||||||
| 301 | ; | - | ||||||||||||
| 302 | options.mode_bits = 0; | - | ||||||||||||
| 303 | options.created_directory_format = | - | ||||||||||||
| 304 | ((void *)0) | - | ||||||||||||
| 305 | ; | - | ||||||||||||
| 306 | options.set_security_context = | - | ||||||||||||
| 307 | 0 | - | ||||||||||||
| 308 | ; | - | ||||||||||||
| 309 | - | |||||||||||||
| 310 | ; | - | ||||||||||||
| 311 | set_program_name (argv[0]); | - | ||||||||||||
| 312 | setlocale ( | - | ||||||||||||
| 313 | 6 | - | ||||||||||||
| 314 | , ""); | - | ||||||||||||
| 315 | bindtextdomain ("coreutils", "/usr/local/share/locale"); | - | ||||||||||||
| 316 | textdomain ("coreutils"); | - | ||||||||||||
| 317 | - | |||||||||||||
| 318 | atexit (close_stdout); | - | ||||||||||||
| 319 | - | |||||||||||||
| 320 | while ((
| 106-247 | ||||||||||||
| 321 | ((void *)0)
| 106-247 | ||||||||||||
| 322 | )) != -1
| 106-247 | ||||||||||||
| 323 | { | - | ||||||||||||
| 324 | switch (optc) | - | ||||||||||||
| 325 | { | - | ||||||||||||
| 326 | case executed 97 times by 1 test: 'p':case 'p':Executed by:
executed 97 times by 1 test: case 'p':Executed by:
| 97 | ||||||||||||
| 327 | options.make_ancestor_function = make_ancestor; | - | ||||||||||||
| 328 | break; executed 97 times by 1 test: break;Executed by:
| 97 | ||||||||||||
| 329 | case executed 3 times by 1 test: 'm':case 'm':Executed by:
executed 3 times by 1 test: case 'm':Executed by:
| 3 | ||||||||||||
| 330 | specified_mode = optarg; | - | ||||||||||||
| 331 | break; executed 3 times by 1 test: break;Executed by:
| 3 | ||||||||||||
| 332 | case never executed: 'v':case 'v':never executed: case 'v': | 0 | ||||||||||||
| 333 | options.created_directory_format = | - | ||||||||||||
| 334 | dcgettext (((void *)0), | - | ||||||||||||
| 335 | "created directory %s" | - | ||||||||||||
| 336 | , 5) | - | ||||||||||||
| 337 | ; | - | ||||||||||||
| 338 | break; never executed: break; | 0 | ||||||||||||
| 339 | case never executed: 'Z':case 'Z':never executed: case 'Z': | 0 | ||||||||||||
| 340 | if (is_smack_enabled ()
| 0 | ||||||||||||
| 341 | { | - | ||||||||||||
| 342 | - | |||||||||||||
| 343 | scontext = optarg; | - | ||||||||||||
| 344 | } never executed: end of block | 0 | ||||||||||||
| 345 | else if (is_selinux_enabled () > 0
| 0 | ||||||||||||
| 346 | { | - | ||||||||||||
| 347 | if (optarg
| 0 | ||||||||||||
| 348 | scontext = optarg; never executed: scontext = optarg; | 0 | ||||||||||||
| 349 | else | - | ||||||||||||
| 350 | options.set_security_context = never executed: options.set_security_context = 1 ; | 0 | ||||||||||||
| 351 | 1 never executed: options.set_security_context = 1 ; | 0 | ||||||||||||
| 352 | ; never executed: options.set_security_context = 1 ; | 0 | ||||||||||||
| 353 | } | - | ||||||||||||
| 354 | else if (optarg
| 0 | ||||||||||||
| 355 | { | - | ||||||||||||
| 356 | error (0, 0, | - | ||||||||||||
| 357 | - | |||||||||||||
| 358 | dcgettext (((void *)0), | - | ||||||||||||
| 359 | "warning: ignoring --context; " "it requires an SELinux/SMACK-enabled kernel" | - | ||||||||||||
| 360 | , 5) | - | ||||||||||||
| 361 | - | |||||||||||||
| 362 | ); | - | ||||||||||||
| 363 | } never executed: end of block | 0 | ||||||||||||
| 364 | break; never executed: break; | 0 | ||||||||||||
| 365 | case executed 2 times by 1 test: GETOPT_HELP_CHAR:case GETOPT_HELP_CHAR:Executed by:
executed 2 times by 1 test: usage (case GETOPT_HELP_CHAR:Executed by:
| 2 | ||||||||||||
| 366 | 0 | - | ||||||||||||
| 367 | ); break; never executed: ;break; | 0 | ||||||||||||
| 368 | case executed 3 times by 1 test: GETOPT_VERSION_CHAR:case GETOPT_VERSION_CHAR:Executed by:
executed 3 times by 1 test: version_etc (case GETOPT_VERSION_CHAR:Executed by:
| 3 | ||||||||||||
| 369 | stdout | - | ||||||||||||
| 370 | , "mkdir", "GNU coreutils", Version, ("David MacKenzie"), (char *) | - | ||||||||||||
| 371 | ((void *)0) | - | ||||||||||||
| 372 | ); exit ( executed 3 times by 1 test: exit ( 0 );Executed by:
| 3 | ||||||||||||
| 373 | 0 executed 3 times by 1 test: exit ( 0 );Executed by:
| 3 | ||||||||||||
| 374 | ); executed 3 times by 1 test: break;exit ( 0 );Executed by:
never executed: ;break; | 0-3 | ||||||||||||
| 375 | default executed 1 time by 1 test: :default:Executed by:
executed 1 time by 1 test: default:Executed by:
| 1 | ||||||||||||
| 376 | usage ( | - | ||||||||||||
| 377 | 1 | - | ||||||||||||
| 378 | ); | - | ||||||||||||
| 379 | } never executed: end of block | 0 | ||||||||||||
| 380 | } | - | ||||||||||||
| 381 | - | |||||||||||||
| 382 | if (optind == argc
| 0-247 | ||||||||||||
| 383 | { | - | ||||||||||||
| 384 | error (0, 0, | - | ||||||||||||
| 385 | dcgettext (((void *)0), | - | ||||||||||||
| 386 | "missing operand" | - | ||||||||||||
| 387 | , 5) | - | ||||||||||||
| 388 | ); | - | ||||||||||||
| 389 | usage ( | - | ||||||||||||
| 390 | 1 | - | ||||||||||||
| 391 | ); | - | ||||||||||||
| 392 | } never executed: end of block | 0 | ||||||||||||
| 393 | - | |||||||||||||
| 394 | - | |||||||||||||
| 395 | - | |||||||||||||
| 396 | - | |||||||||||||
| 397 | if (scontext
| 0-247 | ||||||||||||
| 398 | { | - | ||||||||||||
| 399 | int ret = 0; | - | ||||||||||||
| 400 | if (is_smack_enabled ()
| 0 | ||||||||||||
| 401 | ret = smack_set_label_for_self (scontext); never executed: ret = smack_set_label_for_self (scontext); | 0 | ||||||||||||
| 402 | else | - | ||||||||||||
| 403 | ret = setfscreatecon (se_const (scontext)); never executed: ret = setfscreatecon (se_const (scontext)); | 0 | ||||||||||||
| 404 | - | |||||||||||||
| 405 | if (ret < 0
| 0 | ||||||||||||
| 406 | (( never executed: !!sizeof (struct { _Static_assert (((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 407 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 408 | , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 409 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 410 | , never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 411 | (*__errno_location ()) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 412 | , never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 413 | dcgettext (((void *)0), never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 414 | "failed to set default file creation context to %s" never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 415 | , 5) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 416 | , quote (scontext)), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 417 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 418 | ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 419 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 420 | , never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 421 | (*__errno_location ()) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 422 | , never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 423 | dcgettext (((void *)0), never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 424 | "failed to set default file creation context to %s" never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 425 | , 5) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 426 | , quote (scontext)), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 427 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 428 | ) ? (void) 0 : __builtin_unreachable ())))) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 429 | 0 | |||||||||||||
| 430 | ; never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), dcgettext (((void *)0), \"failed to set default file creation context to %s\", 5), quote (scontext)), assume (false))" ")"); int _gl_dummy; })) ? ((erro... (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , dcgettext (((void *)0), "failed to set default file creation context to %s" , 5) , quote (scontext)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 431 | } never executed: end of block | 0 | ||||||||||||
| 432 | - | |||||||||||||
| 433 | - | |||||||||||||
| 434 | if (options.make_ancestor_function
| 2-150 | ||||||||||||
| 435 | { | - | ||||||||||||
| 436 | mode_t umask_value = umask (0); | - | ||||||||||||
| 437 | umask (umask_value); | - | ||||||||||||
| 438 | options.umask_value = umask_value; | - | ||||||||||||
| 439 | - | |||||||||||||
| 440 | if (specified_mode
| 3-96 | ||||||||||||
| 441 | { | - | ||||||||||||
| 442 | struct mode_change *change = mode_compile (specified_mode); | - | ||||||||||||
| 443 | if (!change
| 0-3 | ||||||||||||
| 444 | (( never executed: !!sizeof (struct { _Static_assert (((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ;never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 445 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 446 | , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 447 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 448 | , 0, never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 449 | dcgettext (((void *)0), never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 450 | "invalid mode %s" never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 451 | , 5) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 452 | , quote (specified_mode)), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 453 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 454 | ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 455 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 456 | , 0, never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 457 | dcgettext (((void *)0), never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 458 | "invalid mode %s" never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 459 | , 5) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 460 | , quote (specified_mode)), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 461 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 462 | ) ? (void) 0 : __builtin_unreachable ())))) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 463 | ; never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid mode %s\", 5), quote (specified_mode)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid mode %s" , 5) , quote (specified_mode)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))) ; | 0 | ||||||||||||
| 464 | options.mode = mode_adjust ( | - | ||||||||||||
| 465 | ((0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3)) | - | ||||||||||||
| 466 | , | - | ||||||||||||
| 467 | 1 | - | ||||||||||||
| 468 | , umask_value, change, | - | ||||||||||||
| 469 | &options.mode_bits); | - | ||||||||||||
| 470 | free (change); | - | ||||||||||||
| 471 | } executed 3 times by 1 test: end of blockExecuted by:
| 3 | ||||||||||||
| 472 | else | - | ||||||||||||
| 473 | options.mode = executed 96 times by 1 test: options.mode = ((0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3)) ;Executed by:
| 96 | ||||||||||||
| 474 | ((0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3)) executed 96 times by 1 test: options.mode = ((0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3)) ;Executed by:
| 96 | ||||||||||||
| 475 | ; executed 96 times by 1 test: options.mode = ((0400|0200|0100) | ((0400|0200|0100) >> 3) | (((0400|0200|0100) >> 3) >> 3)) ;Executed by:
| 96 | ||||||||||||
| 476 | } | - | ||||||||||||
| 477 | - | |||||||||||||
| 478 | return executed 247 times by 1 test: savewd_process_files (argc - optind, argv + optind,return savewd_process_files (argc - optind, argv + optind, process_dir, &options);Executed by:
executed 247 times by 1 test: return savewd_process_files (argc - optind, argv + optind, process_dir, &options);Executed by:
| 247 | ||||||||||||
| 479 | process_dir, &options); executed 247 times by 1 test: return savewd_process_files (argc - optind, argv + optind, process_dir, &options);Executed by:
| 247 | ||||||||||||
| 480 | } | - | ||||||||||||
| Switch to Source code | Preprocessed file |