| 244 | } |
| 245 | |
| 246 | int link_stat(const char *path, STRUCT_STAT *stp, int follow_dirlinks) |
| 247 | { |
| 248 | #ifdef SUPPORT_LINKS |
| 249 | if (copy_links) |
| 250 | return x_stat(path, stp, NULL); |
| 251 | if (x_lstat(path, stp, NULL) < 0) |
| 252 | return -1; |
| 253 | if (follow_dirlinks && S_ISLNK(stp->st_mode)) { |
| 254 | STRUCT_STAT st; |
| 255 | if (x_stat(path, &st, NULL) == 0 && S_ISDIR(st.st_mode)) |
| 256 | *stp = st; |
| 257 | } |
| 258 | return 0; |
| 259 | #else |
| 260 | return x_stat(path, stp, NULL); |
| 261 | #endif |
| 262 | } |
| 263 | |
| 264 | static inline int path_is_daemon_excluded(char *path, int ignore_filename) |
| 265 | { |
no test coverage detected