Lines Matching defs:path

138 static int check_size(const char *path, int len)
141 int res = stat(path, &stbuf);
149 static int check_testfile_size(const char *path, int len)
152 return check_size(path, len);
164 static int check_type(const char *path, mode_t type)
167 int res = lstat(path, &stbuf);
185 static int check_mode(const char *path, mode_t mode)
188 int res = lstat(path, &stbuf);
196 static int check_testfile_mode(const char *path, mode_t mode)
200 return check_mode(path, mode);
203 static int check_times(const char *path, time_t atime, time_t mtime)
207 int res = lstat(path, &stbuf);
261 static int check_nlink(const char *path, nlink_t nlink)
264 int res = lstat(path, &stbuf);
297 static int check_nonexist(const char *path)
300 int res = lstat(path, &stbuf);
321 static int check_data(const char *path, const char *data, int offset,
326 int fd = open(path, O_RDONLY);
393 static int check_dir_contents(const char *path, const char **contents)
409 dp = opendir(path);
463 static int create_file(const char *path, const char *data, int len)
468 unlink(path);
469 fd = creat(path, 0644);
492 res = check_type(path, S_IFREG);
495 res = check_mode(path, 0644);
498 res = check_nlink(path, 1);
501 res = check_size(path, len);
506 res = check_data(path, data, 0, len);
514 static int create_path_fd(const char *path, const char *data, int len)
519 res = create_file(path, data, len);
523 path_fd = open(path, O_PATH);
531 static int create_testfile(const char *path, const char *data, int len)
542 fd = create_path_fd(path, data, len);
598 static int cleanup_dir(const char *path, const char **dir_files, int quiet)
606 sprintf(fpath, "%s/%s", path, dir_files[i]);
619 static int create_dir(const char *path, const char **dir_files)
624 rmdir(path);
625 res = mkdir(path, 0755);
630 res = check_type(path, S_IFDIR);
633 res = check_mode(path, 0755);
639 sprintf(fpath, "%s/%s", path, dir_files[i]);
642 cleanup_dir(path, dir_files, 1);
646 res = check_dir_contents(path, dir_files);
648 cleanup_dir(path, dir_files, 1);
1582 #define PATH(p) (snprintf(path, sizeof path, "%s/%s", testdir, p), path)
1585 char path[1280], path2[1280];
1999 fprintf(stderr, "testdir must be an absolute path\n");