| 972 | }; |
| 973 | |
| 974 | static int mkpath(char *path, mode_t mode) |
| 975 | { |
| 976 | assert (path && *path); |
| 977 | char *p; |
| 978 | for (p = strchr(path+1, '/'); p; p = strchr(p + 1, '/')) { |
| 979 | *p = '\0'; |
| 980 | if (mkdir(path, mode) == -1) { |
| 981 | if (errno != EEXIST) { |
| 982 | *p = '/'; |
| 983 | return -1; |
| 984 | } |
| 985 | } |
| 986 | *p = '/'; |
| 987 | } |
| 988 | return 0; |
| 989 | } |
| 990 | |
| 991 | static void dump_coverage(void) |
| 992 | { |
no test coverage detected