Searched defs:dir (Results 1 - 25 of 48) 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/connectivity/shill/
H A Dcrypto_provider_unittest.cc50 FilePath InitKeyMatterFile(const FilePath& dir);
55 FilePath CryptoProviderTest::InitKeyMatterFile(const FilePath& dir) { argument
56 FilePath path = dir.Append(kKeyMatterFile);
/system/core/adb/
H A Dremount_service.cpp39 static std::string find_proc_mount(const char* dir) { argument
47 if (strcmp(dir, e->mnt_dir) == 0) {
55 static std::string find_fstab_mount(const char* dir) { argument
61 struct fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab, dir);
69 static std::string find_mount(const char* dir) { argument
70 if (strcmp(dir, "/") == 0) {
71 return find_fstab_mount(dir);
73 return find_proc_mount(dir);
89 static bool remount_partition(int fd, const char* dir) { argument
90 if (!directory_exists(dir)) {
[all...]
/system/core/libcutils/
H A Dcanned_fs_config.c85 void canned_fs_config(const char* path, int dir, const char* target_out_path, argument
106 fs_config(path, dir, target_out_path, &c_uid, &c_gid, &c_mode, &c_capabilities);
H A Dfs_config.c163 static int fs_config_open(int dir, const char *target_out_path) argument
177 if (asprintf(&name, "%s%s", target_out_path, (dir ? conf_dir : conf_file) + skip_len) != -1) {
183 fd = TEMP_FAILURE_RETRY(open(dir ? conf_dir : conf_file, O_RDONLY | O_BINARY));
188 static bool fs_config_cmp(bool dir, const char *prefix, size_t len, argument
191 if (dir) {
207 void fs_config(const char *path, int dir, const char *target_out_path, argument
219 fd = fs_config_open(dir, target_out_path);
228 ALOGE("%s len is corrupted", dir ? conf_dir : conf_file);
233 ALOGE("%s out of memory", dir ? conf_dir : conf_file);
238 ALOGE("%s prefix is truncated", dir
[all...]
/system/extras/ext4_utils/
H A Dext4_crypt_init_extensions.cpp60 int e4crypt_create_device_key(const char* dir, argument
66 std::string unencrypted_dir = std::string(dir) + e4crypt_unencrypted_folder;
108 int e4crypt_set_directory_policy(const char* dir) argument
116 if (!dir || strncmp(dir, "/data/", 6) || strchr(dir + 6, '/')) {
132 if ((prefix + d) == dir) {
133 KLOG_INFO(TAG, "Not setting policy on %s\n", dir);
141 KLOG_ERROR(TAG, "Unable to read system policy to set on %s\n", dir);
144 KLOG_INFO(TAG, "Setting policy on %s\n", dir);
[all...]
/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/core/debuggerd/
H A Dgetevent.cpp146 DIR* dir; local
148 dir = opendir(dirname);
149 if (dir == NULL)
154 while ((de = readdir(dir))) {
161 closedir(dir);
/system/netd/server/
H A DInterfaceController.cpp64 DIR* dir = opendir(dirname); local
65 if (!dir) {
70 while ((d = readdir(dir))) {
76 closedir(dir);
/system/security/keystore/
H A Duser_state.cpp205 DIR* dir = opendir(getUserDirName()); local
206 if (!dir) {
216 while ((file = readdir(dir)) != NULL) {
222 unlinkat(dirfd(dir), file->d_name, 0);
224 closedir(dir);
/system/vold/
H A DMoveTask.cpp64 DIR* dir = opendir(path.c_str()); local
65 if (dir == NULL) {
70 while ((ent = readdir(dir)) != NULL) {
77 closedir(dir);
H A DProcess.cpp89 DIR *dir = opendir(path); local
90 if (!dir)
99 while ((de = readdir(dir))) {
115 closedir(dir);
120 closedir(dir);
182 DIR* dir; local
185 if (!(dir = opendir("/proc"))) {
190 while ((de = readdir(dir))) {
220 closedir(dir);
H A DCommandListener.cpp308 DIR *dir; local
315 if (!(dir = opendir("/proc"))) {
320 while ((de = readdir(dir))) {
341 closedir(dir);
357 cli->sendMsg(ResponseCode::OperationFailed, "Failed to open asec dir", true);
683 const android::vold::ScopedDir dir(opendir("/proc"));
684 if (dir.get() == nullptr) {
692 openat(dirfd(dir.get()), pid_str.c_str(), O_RDONLY | O_DIRECTORY | O_CLOEXEC));
717 android::vold::SaneReadLinkAt(dirfd(dir.get()), "1/ns/mnt", rootName, PATH_MAX);
H A DKeyStorage.cpp246 bool storeKey(const std::string& dir, const KeyAuthentication& auth, const std::string& key) { argument
247 if (TEMP_FAILURE_RETRY(mkdir(dir.c_str(), 0700)) == -1) {
248 PLOG(ERROR) << "key mkdir " << dir;
251 if (!writeStringToFile(kCurrentVersion, dir + "/" + kFn_version)) return false;
258 if (!writeStringToFile(secdiscardable, dir + "/" + kFn_secdiscardable)) return false;
260 if (!writeStringToFile(stretching, dir + "/" + kFn_stretching)) return false;
267 if (!writeStringToFile(salt, dir + "/" + kFn_salt)) return false;
275 if (!writeStringToFile(kmKey, dir + "/" + kFn_keymaster_key_blob)) return false;
278 if (!writeStringToFile(encryptedKey, dir + "/" + kFn_encrypted_key)) return false;
282 bool retrieveKey(const std::string& dir, cons argument
308 deleteKey(const std::string& dir) argument
317 secdiscardSecdiscardable(const std::string& dir) argument
326 recursiveDeleteKey(const std::string& dir) argument
334 destroyKey(const std::string& dir) argument
[all...]
/system/core/healthd/
H A DBatteryMonitor.cpp491 DIR* dir = opendir(POWER_SUPPLY_SYSFS_PATH); local
492 if (dir == NULL) {
497 while ((entry = readdir(dir))) {
635 closedir(dir);
/system/core/libprocessgroup/
H A Dprocessgroup.cpp207 struct dirent *dir; local
208 while ((readdir_r(uid, &cur, &dir) == 0) && dir) {
211 if (dir->d_type != DT_DIR) {
215 if (strncmp(dir->d_name, PROCESSGROUP_PID_PREFIX, strlen(PROCESSGROUP_PID_PREFIX))) {
219 snprintf(path, sizeof(path), "%s/%s", uid_path, dir->d_name);
236 struct dirent *dir; local
237 while ((readdir_r(root, &cur, &dir) == 0) && dir) {
240 if (dir
[all...]
/system/core/metricsd/
H A Dmetrics_library.cc154 base::FilePath dir = base::FilePath(metrics::kSharedMetricsDirectory); local
155 consent_file_ = dir.Append(metrics::kConsentFileName);
/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.c204 DIR *dir; local
210 dir = opendir(dirname);
211 if (!dir) {
212 fprintf(stderr, "Could not open task dir for process %d.\n", pid);
218 while ((ent = readdir(dir))) {
227 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/extras/simpleperf/
H A Dutils.cpp110 DIR* dir = opendir(dirpath.c_str()); local
111 if (dir == nullptr) {
112 PLOG(DEBUG) << "can't open dir " << dirpath;
116 while ((entry = readdir(dir)) != nullptr) {
130 closedir(dir);
176 PLOG(ERROR) << "failed to create dir " << dir_path;
/system/update_engine/payload_generator/
H A Dext2_filesystem.cc85 int UpdateFileAndAppend(ext2_ino_t dir, argument
102 auto dir_file = state->inodes->find(dir);
260 inodes[dir_ino].name = base::StringPrintf("<dir-%u>", dir_ino);
/system/core/logcat/tests/
H A Dlogcat_test.cpp707 DIR *dir; local
708 EXPECT_TRUE(NULL != (dir = opendir(tmp_out_dir)));
709 if (!dir) {
716 while ((entry = readdir(dir))) {
739 closedir(dir);
/system/extras/tests/sdcard/
H A Dsysutil.cpp410 DIR *dir = opendir(directory); local
412 if (NULL != dir)
417 while((entry = readdir(dir)))
430 closedir(dir);
/system/tools/aidl/
H A Dgenerate_java_binder.cpp434 AidlArgument::Direction dir = arg->GetDirection(); local
435 if (dir == AidlArgument::OUT_DIR && arg->GetType().IsArray()) {
444 } else if (dir & AidlArgument::IN_DIR) {

Completed in 582 milliseconds

12