Lines Matching refs:mode
42 static int fs_prepare_path_impl(const char* path, mode_t mode, uid_t uid, gid_t gid, in fs_prepare_path_impl() argument
69 mode_match = ((sb.st_mode & ALL_PERMS) == mode); in fs_prepare_path_impl()
81 path, mode, (sb.st_mode & ALL_PERMS)); in fs_prepare_path_impl()
88 ? TEMP_FAILURE_RETRY(mkdir(path, mode)) in fs_prepare_path_impl()
103 if (TEMP_FAILURE_RETRY(chmod(path, mode)) == -1) { in fs_prepare_path_impl()
104 ALOGE("Failed to chmod(%s, %d): %s", path, mode, strerror(errno)); in fs_prepare_path_impl()
115 int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid) { in fs_prepare_dir() argument
116 return fs_prepare_path_impl(path, mode, uid, gid, /*allow_fixup*/ 1, /*prepare_as_dir*/ 1); in fs_prepare_dir()
119 int fs_prepare_dir_strict(const char* path, mode_t mode, uid_t uid, gid_t gid) { in fs_prepare_dir_strict() argument
120 return fs_prepare_path_impl(path, mode, uid, gid, /*allow_fixup*/ 0, /*prepare_as_dir*/ 1); in fs_prepare_dir_strict()
123 int fs_prepare_file_strict(const char* path, mode_t mode, uid_t uid, gid_t gid) { in fs_prepare_file_strict() argument
124 return fs_prepare_path_impl(path, mode, uid, gid, /*allow_fixup*/ 0, /*prepare_as_dir*/ 0); in fs_prepare_file_strict()
196 int fs_mkdirs(const char* path, mode_t mode) { in fs_mkdirs() argument
226 if (mkdirat(fd, segment, mode) != 0) { in fs_mkdirs()