Searched defs:dir (Results 1 - 25 of 50) sorted by relevance

12

/system/extras/tests/storage/
H A Dopentest.c31 char *dir; local
41 dir = argv[1];
49 if (stat(dir, &statbuf)) {
50 fprintf(stderr, "Cannot stat %s\n", dir);
55 fprintf(stderr, "%s is not a directory!\n", dir);
59 if (access(dir, R_OK | W_OK)) {
60 fprintf(stderr, "No access to %s\n", dir);
70 if (chdir(dir)) {
71 fprintf(stderr, "Cannot chdir to %s\n", dir);
/system/extras/ext4_utils/
H A Dext4_crypt_init_extensions.cpp44 static int set_system_de_policy_on(char const* dir);
61 int e4crypt_set_directory_policy(const char* dir) argument
63 if (!dir || strncmp(dir, "/data/", 6)) {
68 if (strcmp(dir, "/data/media/obb") == 0) {
70 set_system_de_policy_on(dir);
78 if (strchr(dir + 6, '/')) {
95 if ((prefix + d) == dir) {
96 LOG(INFO) << "Not setting policy on " << dir;
100 return set_system_de_policy_on(dir);
103 set_system_de_policy_on(char const* dir) argument
[all...]
/system/timezone/tzlookup_generator/src/test/java/com/android/libcore/timezone/tzlookup/
H A DTestUtils.java39 static String createFile(Path dir, String... lines) throws IOException { argument
40 Path tempFile = Files.createTempFile(dir, "tmp", null /* suffix */);
54 public FileVisitResult postVisitDirectory(Path dir, IOException exc)
56 return delete(dir);
/system/bt/include/hardware/avrcp/
H A Davrcp_logging_helper.h216 inline std::string DirectionText(const Direction& dir) { argument
217 switch (dir) {
221 return "Unknown Direction: " + loghex((uint8_t)dir);
225 inline std::ostream& operator<<(std::ostream& os, const Direction& dir) { argument
226 return os << DirectionText(dir);
238 inline std::ostream& operator<<(std::ostream& os, const KeyState& dir) { argument
239 return os << KeyStateText(dir);
/system/core/adb/
H A Dremount_service.cpp40 static std::string find_proc_mount(const char* dir) { argument
48 if (strcmp(dir, e->mnt_dir) == 0) {
56 static std::string find_fstab_mount(const char* dir) { argument
59 struct fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab.get(), dir);
65 static std::string find_mount(const char* dir, bool is_root) { argument
67 return find_fstab_mount(dir);
69 return find_proc_mount(dir);
85 static bool remount_partition(int fd, const char* dir) { argument
86 if (!directory_exists(dir)) {
89 bool is_root = strcmp(dir, "/")
[all...]
/system/core/init/
H A Dinit_test.cpp142 // 3: dir_a - file named 'a.rc' in dir; dir is imported after first_import
144 // 5: dir_b - file named 'b.rc' in dir
145 // 6: last_import - imported after dir is imported
159 TemporaryDir dir; local
166 ASSERT_TRUE(WriteFile(std::string(dir.path) + "/a.rc", dir_a_script));
168 ASSERT_TRUE(WriteFile(std::string(dir.path) + "/b.rc", "on boot\nexecute 5"));
172 "import " + std::string(dir.path) + "\n"
H A Dueventd_test.cpp76 TemporaryDir dir; local
80 std::generate_n(std::back_inserter(files_and_gids), 100, [&gid, &dir]() {
82 return std::pair(dir.path + "/gid_"s + std::to_string(gid), gid);
111 TemporaryDir dir; local
114 files_and_contexts.emplace_back(dir.path + "/context_"s + context, context);
/system/core/libcutils/tests/
H A Dfs_config.cpp40 bool dir; member in struct:fs_config_cmp_test
139 match = __for_testing_only__fs_config_cmp(tests[idx].dir, tests[idx].prefix,
/system/extras/libpagemap/
H A Dpm_kernel.c64 struct dirent *dir; local
80 while ((dir = readdir(proc))) {
81 if (sscanf(dir->d_name, "%d", &pid) < 1)
/system/timezone/distro/core/src/main/com/android/timezone/distro/
H A DFileUtils.java62 public static void ensureDirectoriesExist(File dir, boolean makeWorldReadable) argument
65 File currentDir = dir;
74 throw new IOException("Unable to create directory: " + dir);
/system/core/debuggerd/handler/
H A Ddebuggerd_fallback.cpp106 DIR* dir = opendir(buf); local
108 if (!dir) {
114 while ((ent = readdir(dir))) {
125 closedir(dir);
/system/core/libcutils/
H A Dcanned_fs_config.cpp95 void canned_fs_config(const char* path, int dir, const char* target_out_path, argument
117 fs_config(path, dir, target_out_path, &c_uid, &c_gid, &c_mode, &c_capabilities);
H A Dfs_config.cpp220 static int fs_config_open(int dir, int which, const char* target_out_path) { argument
231 if (asprintf(&name, "%.*s%s", (int)len, target_out_path, conf[which][dir]) != -1) {
237 fd = TEMP_FAILURE_RETRY(open(conf[which][dir], O_RDONLY | O_BINARY));
289 void fs_config(const char* path, int dir, const char* target_out_path, unsigned* uid, unsigned* gid, argument
303 int fd = fs_config_open(dir, which, target_out_path);
311 ALOGE("%s len is corrupted", conf[which][dir]);
316 ALOGE("%s out of memory", conf[which][dir]);
321 ALOGE("%s prefix is truncated", conf[which][dir]);
327 ALOGE("%s is corrupted", conf[which][dir]);
330 if (fs_config_cmp(dir, prefi
[all...]
/system/libhidl/base/
H A DHidlInternal.cpp155 DIR *dir = opendir(path.c_str()); local
156 if (dir == 0) {
162 while ((file = readdir(dir)) != nullptr) {
208 closedir(dir);
/system/security/keystore/
H A Duser_state.cpp201 DIR* dir = opendir(getUserDirName()); local
202 if (!dir) {
212 while ((file = readdir(dir)) != NULL) {
218 unlinkat(dirfd(dir), file->d_name, 0);
220 closedir(dir);
/system/timezone/distro/core/src/test/com/android/timezone/distro/
H A DFileUtilsTest.java53 File dir = createTempDir();
54 File file1 = createRegularFile(dir, "file1");
55 File file2 = createRegularFile(dir, "file2");
56 File symLink1 = createSymlink(file1, dir, "symLink1");
57 File subDir = createDir(dir, "subDir");
60 File symLink2 = createSymlink(file1, dir, "symLink2");
68 File[] filesToDelete = { dir, file1, file2, symLink1, subDir, file3, file4, symLink2,
74 FileUtils.deleteRecursive(dir);
80 File dir = createTempDir();
81 File subDir = createDir(dir, "subDi
330 assertDirExistsAndIsAccessible(File dir, boolean requireWorldReadable) argument
359 createRegularFile(File dir, String name) argument
[all...]
/system/vold/
H A DMetadataCrypt.cpp81 auto dir = key_dir + "/key"; local
82 LOG(DEBUG) << "key_dir/key: " << dir;
83 if (fs_mkdirs(dir.c_str(), 0700)) {
84 PLOG(ERROR) << "Creating directories: " << dir;
88 if (!android::vold::retrieveKey(create_if_absent, dir, temp, key)) return false;
H A DMoveStorage.cpp60 DIR* dir = opendir(path.c_str()); local
61 if (dir == NULL) {
66 while ((ent = readdir(dir)) != NULL) {
77 closedir(dir);
/system/core/libprocessgroup/
H A Dprocessgroup.cpp116 dirent* dir; local
117 while ((dir = readdir(uid.get())) != nullptr) {
118 if (dir->d_type != DT_DIR) {
122 if (!StartsWith(dir->d_name, "pid_")) {
126 auto path = StringPrintf("%s/%s", uid_path.c_str(), dir->d_name);
141 dirent* dir; local
142 while ((dir = readdir(root.get())) != nullptr) {
143 if (dir->d_type != DT_DIR) {
147 if (!StartsWith(dir->d_name, "uid_")) {
151 auto path = StringPrintf("%s/%s", cgroup_root_path.c_str(), dir
[all...]
/system/core/toolbox/upstream-netbsd/usr.bin/grep/
H A Dutil.c117 char *d, *dir = NULL; local
160 dir = grep_malloc(sizeof(char) *
162 memcpy(dir, p->fts_path,
164 dir[d - p->fts_path] = '\0';
166 ok = dir_matching(dir);
167 free(dir);
168 dir = NULL;
/system/extras/latencytop/
H A Dlatencytop.c202 DIR *dir; local
208 dir = opendir(dirname);
209 if (!dir) {
210 fprintf(stderr, "Could not open task dir for process %d.\n", pid);
216 while ((ent = readdir(dir))) {
225 closedir(dir);
/system/extras/puncture_fs/
H A Dpuncture_fs.c121 static bool create_unique_dir(char *dir, const char * const root_path) { argument
130 sprintf(dir, "%s/%s", root_path, random_string);
132 if (mkdir(dir, 0777) < 0) {
133 fprintf(stderr, "\nerrno: %d. Failed to create %s\n", errno, dir);
/system/timezone/distro/installer/src/main/com/android/timezone/distro/installer/
H A DTimeZoneDistroInstaller.java351 private void deleteBestEffort(File dir) { argument
352 if (dir.exists()) {
353 Slog.i(logTag, "Deleting " + dir);
355 FileUtils.deleteRecursive(dir);
358 Slog.w(logTag, "Unable to delete " + dir, e);
/system/update_engine/payload_generator/
H A Dext2_filesystem.cc93 int UpdateFileAndAppend(ext2_ino_t dir, argument
110 auto dir_file = state->inodes->find(dir);
268 inodes[dir_ino].name = base::StringPrintf("<dir-%u>", dir_ino);
/system/extras/simpleperf/
H A Dutils.cpp118 DIR* dir = opendir(dirpath.c_str()); local
119 if (dir == nullptr) {
120 PLOG(DEBUG) << "can't open dir " << dirpath;
124 while ((entry = readdir(dir)) != nullptr) {
130 closedir(dir);
188 PLOG(ERROR) << "failed to create dir " << dir_path;

Completed in 396 milliseconds

12