Lines Matching defs:dp
1466 * Check whether the file corresponding to dp is an archive of the logfile
1471 validate_old_timelog(int fd, const struct dirent *dp, const char *logfname,
1481 if (dp->d_type != DT_REG) {
1487 if (dp->d_type != DT_UNKNOWN ||
1488 fstatat(fd, dp->d_name, &sb, AT_SYMLINK_NOFOLLOW) != 0 ||
1493 if (strncmp(dp->d_name, logfname, logfname_len) != 0)
1496 if (dp->d_namlen == logfname_len)
1503 if (dp->d_name[logfname_len] != '.') {
1506 "extension '%s'\n", dp->d_name,
1507 &dp->d_name[logfname_len]);
1511 if ((s = strptime(&dp->d_name[logfname_len + 1],
1521 "match time format\n", dp->d_name);
1532 dp->d_name, s);
1546 struct dirent *dp;
1577 while ((dp = readdir(dirp)) != NULL) {
1578 if (validate_old_timelog(dir_fd, dp, logfname, &tm) == 0)
1587 if ((oldlogs[logcnt].fname = strdup(dp->d_name)) == NULL)
2336 struct dirent *dp;
2361 while ((dp = readdir(dirp)) != NULL) {
2362 if (validate_old_timelog(dir_fd, dp, logfname, &tm) == 0)
2365 if (fstatat(dir_fd, dp->d_name, &sb, AT_SYMLINK_NOFOLLOW) == -1) {