Searched defs:dir (Results 1 - 25 of 38) 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/simpleperf/
H A Dutils.cpp57 DIR* dir = opendir(dirpath.c_str()); local
58 if (dir == nullptr) {
59 PLOG(DEBUG) << "can't open dir " << dirpath;
63 while ((entry = readdir(dir)) != nullptr) {
77 closedir(dir);
/system/core/adb/
H A Dremount_service.cpp38 static std::string find_mount(const char* dir) { argument
46 if (strcmp(dir, e->mnt_dir) == 0) {
65 static bool remount_partition(int fd, const char* dir) { argument
66 if (!directory_exists(dir)) {
69 std::string dev = find_mount(dir);
75 dir, dev.c_str(), strerror(errno));
78 if (mount(dev.c_str(), dir, "none", MS_REMOUNT, nullptr) == -1) {
79 WriteFdFmt(fd, "remount of %s failed: %s\n", dir, strerror(errno));
/system/extras/ext4_utils/
H A Dunencrypted_properties.cpp26 DIR* dir = opendir(folder_.c_str()); local
27 if (dir) {
28 closedir(dir);
H A Dcanned_fs_config.c83 void canned_fs_config(const char* path, int dir, const char* target_out_path, argument
102 fs_config(path, dir, target_out_path, &c_uid, &c_gid, &c_mode, &c_capabilities);
H A Dext4_crypt_init_extensions.cpp93 int e4crypt_create_device_key(const char* dir, argument
97 std::string temp_folder = std::string() + dir + "/tmp_mnt";
105 if (ensure_dir_exists(UnencryptedProperties::GetPath(dir).c_str())) {
107 UnencryptedProperties::GetPath(dir).c_str(),
136 int e4crypt_set_directory_policy(const char* dir) argument
142 if (!dir || strncmp(dir, "/data/", 6) || strchr(dir + 6, '/')) {
152 KLOG_INFO(TAG, "Setting policy on %s\n", dir);
153 int result = do_policy_set(dir, polic
[all...]
H A Dext4_crypt.cpp60 DIR *dir; local
62 dir = opendir(dirname);
63 while ((d = readdir(dir)) != NULL) {
70 closedir(dir);
127 bool e4crypt_non_default_key(const char* dir) argument
129 UnencryptedProperties props(dir);
/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/vold/
H A DProcess.cpp89 DIR *dir = opendir(path); local
90 if (!dir)
99 while ((de = readdir(dir))) {
115 closedir(dir);
120 closedir(dir);
181 DIR* dir; local
184 if (!(dir = opendir("/proc"))) {
189 while ((de = readdir(dir))) {
218 closedir(dir);
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 DCommandListener.cpp303 DIR *dir; local
310 if (!(dir = opendir("/proc"))) {
315 while ((de = readdir(dir))) {
336 closedir(dir);
352 cli->sendMsg(ResponseCode::OperationFailed, "Failed to open asec dir", true);
/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/core/libcutils/
H A Dfs_config.c152 static int fs_config_open(int dir, const char *target_out_path) argument
166 asprintf(&name, "%s%s", target_out_path, (dir ? conf_dir : conf_file) + skip_len);
173 fd = TEMP_FAILURE_RETRY(open(dir ? conf_dir : conf_file, O_RDONLY | O_BINARY));
178 static bool fs_config_cmp(bool dir, const char *prefix, size_t len, argument
181 if (dir) {
197 void fs_config(const char *path, int dir, const char *target_out_path, argument
209 fd = fs_config_open(dir, target_out_path);
218 ALOGE("%s len is corrupted", dir ? conf_dir : conf_file);
223 ALOGE("%s out of memory", dir ? conf_dir : conf_file);
228 ALOGE("%s prefix is truncated", dir
[all...]
/system/core/libprocessgroup/
H A Dprocessgroup.cpp168 struct dirent *dir; local
169 while ((readdir_r(uid, &cur, &dir) == 0) && dir) {
172 if (dir->d_type != DT_DIR) {
176 if (strncmp(dir->d_name, PROCESSGROUP_PID_PREFIX, strlen(PROCESSGROUP_PID_PREFIX))) {
180 snprintf(path, sizeof(path), "%s/%s", uid_path, dir->d_name);
196 struct dirent *dir; local
197 while ((readdir_r(root, &cur, &dir) == 0) && dir) {
200 if (dir
[all...]
/system/core/toolbox/
H A Dlsof.c140 DIR *dir = opendir(info->path); local
141 if (dir == NULL) {
151 while ((de = readdir(dir))) {
157 closedir(dir);
231 DIR *dir = opendir("/proc"); local
232 if (dir == NULL) {
238 while ((de = readdir(dir))) {
249 closedir(dir);
H A Dmount.c165 do_mount(char *dev, char *dir, char *type, unsigned long rwflag, void *data, int loop, argument
206 if (mount(dev, dir, s, rwflag, data) == -1) {
260 static int get_mounts_dev_dir(const char *arg, char **dev, char **dir) argument
289 *dir = strdup(mount_dir);
303 char *dir = NULL; local
347 dir = argv[optind + 1];
349 get_mounts_dev_dir(argv[optind], &dev, &dir);
352 if (dev == NULL || dir == NULL || type == NULL) {
358 return do_mount(dev, dir, type, rwflag, extra.str, loop, loopdev);
359 /* We leak dev and dir i
[all...]
/system/netd/server/
H A DInterfaceController.cpp64 DIR* dir = opendir(dirname); local
65 if (!dir) {
70 while ((d = readdir(dir))) {
76 closedir(dir);
/system/core/healthd/
H A DBatteryMonitor.cpp380 DIR* dir = opendir(POWER_SUPPLY_SYSFS_PATH); local
381 if (dir == NULL) {
386 while ((entry = readdir(dir))) {
508 closedir(dir);
/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/tests/sdcard/
H A Dsysutil.cpp410 DIR *dir = opendir(directory); local
412 if (NULL != dir)
417 while((entry = readdir(dir)))
430 closedir(dir);
/system/bt/btif/src/
H A Dbtif_hf.c1192 static bt_status_t clcc_response(int index, bthf_call_direction_t dir, argument
1221 BTIF_TRACE_EVENT("clcc_response: [%d] dir %d state %d mode %d number = %s type = %d",
1222 index, dir, state, mode, number, type);
1224 index, dir, state, mode, mpty);
/system/core/adf/libadf/
H A Dadf.c36 DIR *dir; local
42 dir = opendir(ADF_BASE_PATH);
43 if (!dir)
47 while ((dirent = readdir(dir))) {
74 closedir(dir);
/system/core/init/
H A Dbuiltins.cpp827 static int do_installkeys_ensure_dir_exists(const char* dir) argument
829 if (make_dir(dir, 0700) && errno != EEXIST) {

Completed in 232 milliseconds

12