Home
last modified time | relevance | path

Searched refs:dir (Results 1 – 25 of 213) sorted by relevance

123456789

/system/core/toolbox/upstream-netbsd/bin/dd/
Ddd.h63 #define ddop_open(dir, a1, a2, ...) dir.ops->op_open(a1, a2, __VA_ARGS__) argument
64 #define ddop_close(dir, a1) dir.ops->op_close(a1) argument
65 #define ddop_fcntl(dir, a1, a2, ...) dir.ops->op_fcntl(a1, a2, __VA_ARGS__) argument
66 #define ddop_ioctl(dir, a1, a2, ...) dir.ops->op_ioctl(a1, a2, __VA_ARGS__) argument
67 #define ddop_fsync(dir, a1) dir.ops->op_fsync(a1) argument
68 #define ddop_ftruncate(dir, a1, a2) dir.ops->op_ftruncate(a1, a2) argument
69 #define ddop_lseek(dir, a1, a2, a3) dir.ops->op_lseek(a1, a2, a3) argument
70 #define ddop_read(dir, a1, a2, a3) dir.ops->op_read(a1, a2, a3) argument
71 #define ddop_write(dir, a1, a2, a3) dir.ops->op_write(a1, a2, a3) argument
/system/extras/tests/storage/
Dopentest.c31 char *dir; in main() local
41 dir = argv[1]; in main()
49 if (stat(dir, &statbuf)) { in main()
50 fprintf(stderr, "Cannot stat %s\n", dir); in main()
55 fprintf(stderr, "%s is not a directory!\n", dir); in main()
59 if (access(dir, R_OK | W_OK)) { in main()
60 fprintf(stderr, "No access to %s\n", dir); in main()
70 if (chdir(dir)) { in main()
71 fprintf(stderr, "Cannot chdir to %s\n", dir); in main()
/system/extras/ext4_utils/
Dext4_crypt_init_extensions.cpp93 int e4crypt_create_device_key(const char* dir, in e4crypt_create_device_key() argument
97 std::string temp_folder = std::string() + dir + "/tmp_mnt"; in e4crypt_create_device_key()
105 if (ensure_dir_exists(UnencryptedProperties::GetPath(dir).c_str())) { in e4crypt_create_device_key()
107 UnencryptedProperties::GetPath(dir).c_str(), in e4crypt_create_device_key()
136 int e4crypt_set_directory_policy(const char* dir) in e4crypt_set_directory_policy() argument
142 if (!dir || strncmp(dir, "/data/", 6) || strchr(dir + 6, '/')) { in e4crypt_set_directory_policy()
152 KLOG_INFO(TAG, "Setting policy on %s\n", dir); in e4crypt_set_directory_policy()
153 int result = do_policy_set(dir, policy.c_str(), policy.size()); in e4crypt_set_directory_policy()
156 policy.c_str(), dir); in e4crypt_set_directory_policy()
Dext4_crypt.cpp60 DIR *dir; in is_dir_empty() local
62 dir = opendir(dirname); in is_dir_empty()
63 while ((d = readdir(dir)) != NULL) { in is_dir_empty()
70 closedir(dir); in is_dir_empty()
127 bool e4crypt_non_default_key(const char* dir) in e4crypt_non_default_key() argument
129 UnencryptedProperties props(dir); in e4crypt_non_default_key()
Dunencrypted_properties.cpp26 DIR* dir = opendir(folder_.c_str()); in UnencryptedProperties() local
27 if (dir) { in UnencryptedProperties()
28 closedir(dir); in UnencryptedProperties()
Dext4.h565 #define is_dx(dir) (EXT4_HAS_COMPAT_FEATURE(dir->i_sb, EXT4_FEATURE_COMPAT_DIR_INDEX) && (EXT4_… argument
566 #define EXT4_DIR_LINK_MAX(dir) (!is_dx(dir) && (dir)->i_nlink >= EXT4_LINK_MAX) argument
567 #define EXT4_DIR_LINK_EMPTY(dir) ((dir)->i_nlink == 2 || (dir)->i_nlink == 1) argument
/system/core/adb/
Dremount_service.cpp38 static std::string find_mount(const char* dir) { in find_mount() argument
46 if (strcmp(dir, e->mnt_dir) == 0) { in find_mount()
65 static bool remount_partition(int fd, const char* dir) { in remount_partition() argument
66 if (!directory_exists(dir)) { in remount_partition()
69 std::string dev = find_mount(dir); in remount_partition()
75 dir, dev.c_str(), strerror(errno)); in remount_partition()
78 if (mount(dev.c_str(), dir, "none", MS_REMOUNT, nullptr) == -1) { in remount_partition()
79 WriteFdFmt(fd, "remount of %s failed: %s\n", dir, strerror(errno)); in remount_partition()
/system/core/libcutils/
Dfs_config.c152 static int fs_config_open(int dir, const char *target_out_path) in fs_config_open() argument
166 asprintf(&name, "%s%s", target_out_path, (dir ? conf_dir : conf_file) + skip_len); in fs_config_open()
173 fd = TEMP_FAILURE_RETRY(open(dir ? conf_dir : conf_file, O_RDONLY | O_BINARY)); in fs_config_open()
178 static bool fs_config_cmp(bool dir, const char *prefix, size_t len, in fs_config_cmp() argument
181 if (dir) { in fs_config_cmp()
197 void fs_config(const char *path, int dir, const char *target_out_path, in fs_config() argument
209 fd = fs_config_open(dir, target_out_path); in fs_config()
218 ALOGE("%s len is corrupted", dir ? conf_dir : conf_file); in fs_config()
223 ALOGE("%s out of memory", dir ? conf_dir : conf_file); in fs_config()
228 ALOGE("%s prefix is truncated", dir ? conf_dir : conf_file); in fs_config()
[all …]
/system/vold/
DProcess.cpp89 DIR *dir = opendir(path); in checkFileDescriptorSymLinks() local
90 if (!dir) in checkFileDescriptorSymLinks()
99 while ((de = readdir(dir))) { in checkFileDescriptorSymLinks()
115 closedir(dir); in checkFileDescriptorSymLinks()
120 closedir(dir); in checkFileDescriptorSymLinks()
181 DIR* dir; in killProcessesWithOpenFiles() local
184 if (!(dir = opendir("/proc"))) { in killProcessesWithOpenFiles()
189 while ((de = readdir(dir))) { in killProcessesWithOpenFiles()
218 closedir(dir); in killProcessesWithOpenFiles()
DMoveTask.cpp64 DIR* dir = opendir(path.c_str()); in pushBackContents() local
65 if (dir == NULL) { in pushBackContents()
70 while ((ent = readdir(dir)) != NULL) { in pushBackContents()
77 closedir(dir); in pushBackContents()
/system/core/libprocessgroup/
Dprocessgroup.cpp168 struct dirent *dir; in removeUidProcessGroups() local
169 while ((readdir_r(uid, &cur, &dir) == 0) && dir) { in removeUidProcessGroups()
172 if (dir->d_type != DT_DIR) { in removeUidProcessGroups()
176 if (strncmp(dir->d_name, PROCESSGROUP_PID_PREFIX, strlen(PROCESSGROUP_PID_PREFIX))) { in removeUidProcessGroups()
180 snprintf(path, sizeof(path), "%s/%s", uid_path, dir->d_name); in removeUidProcessGroups()
196 struct dirent *dir; in removeAllProcessGroups() local
197 while ((readdir_r(root, &cur, &dir) == 0) && dir) { in removeAllProcessGroups()
200 if (dir->d_type != DT_DIR) { in removeAllProcessGroups()
203 if (strncmp(dir->d_name, PROCESSGROUP_UID_PREFIX, strlen(PROCESSGROUP_UID_PREFIX))) { in removeAllProcessGroups()
207 snprintf(path, sizeof(path), "%s/%s", PROCESSGROUP_CGROUP_PATH, dir->d_name); in removeAllProcessGroups()
/system/core/rootdir/
DAndroid.mk1 LOCAL_PATH:= $(call my-dir)
37 $(hide) mkdir -p $(dir $@) && rm -rf $(dir $@)*.bcp.dep && touch $@
41 @mkdir -p $(dir $@)
/system/core/toolbox/
Dlsof.c140 DIR *dir = opendir(info->path); in print_fds() local
141 if (dir == NULL) { in print_fds()
151 while ((de = readdir(dir))) { in print_fds()
157 closedir(dir); in print_fds()
231 DIR *dir = opendir("/proc"); in lsof_main() local
232 if (dir == NULL) { in lsof_main()
238 while ((de = readdir(dir))) { in lsof_main()
249 closedir(dir); in lsof_main()
Dmount.c165 do_mount(char *dev, char *dir, char *type, unsigned long rwflag, void *data, int loop, in do_mount() argument
206 if (mount(dev, dir, s, rwflag, data) == -1) { in do_mount()
260 static int get_mounts_dev_dir(const char *arg, char **dev, char **dir) in get_mounts_dev_dir() argument
289 *dir = strdup(mount_dir); in get_mounts_dev_dir()
303 char *dir = NULL; in mount_main() local
347 dir = argv[optind + 1]; in mount_main()
349 get_mounts_dev_dir(argv[optind], &dev, &dir); in mount_main()
352 if (dev == NULL || dir == NULL || type == NULL) { in mount_main()
358 return do_mount(dev, dir, type, rwflag, extra.str, loop, loopdev); in mount_main()
Dgetevent.c283 DIR *dir; in print_hid_descriptor() local
291 dir = opendir(dirname); in print_hid_descriptor()
292 if(dir == NULL) in print_hid_descriptor()
294 while((de = readdir(dir))) { in print_hid_descriptor()
310 closedir(dir); in print_hid_descriptor()
478 DIR *dir; in scan_dir() local
480 dir = opendir(dirname); in scan_dir()
481 if(dir == NULL) in scan_dir()
486 while((de = readdir(dir))) { in scan_dir()
494 closedir(dir); in scan_dir()
/system/extras/simpleperf/
Dutils.cpp57 DIR* dir = opendir(dirpath.c_str()); in GetEntriesInDir() local
58 if (dir == nullptr) { in GetEntriesInDir()
63 while ((entry = readdir(dir)) != nullptr) { in GetEntriesInDir()
77 closedir(dir); in GetEntriesInDir()
/system/netd/server/
DInterfaceController.cpp64 DIR* dir = opendir(dirname); in setOnAllInterfaces() local
65 if (!dir) { in setOnAllInterfaces()
70 while ((d = readdir(dir))) { in setOnAllInterfaces()
76 closedir(dir); in setOnAllInterfaces()
/system/core/debuggerd/
Dgetevent.cpp146 DIR* dir; in scan_dir() local
148 dir = opendir(dirname); in scan_dir()
149 if (dir == NULL) in scan_dir()
154 while ((de = readdir(dir))) { in scan_dir()
161 closedir(dir); in scan_dir()
/system/core/toolbox/upstream-netbsd/usr.bin/grep/
Dutil.c117 char *d, *dir = NULL; in grep_tree() local
160 dir = grep_malloc(sizeof(char) * in grep_tree()
162 memcpy(dir, p->fts_path, in grep_tree()
164 dir[d - p->fts_path] = '\0'; in grep_tree()
166 ok = dir_matching(dir); in grep_tree()
167 free(dir); in grep_tree()
168 dir = NULL; in grep_tree()
/system/extras/libpagemap/
Dpm_kernel.c64 struct dirent *dir; in pm_kernel_pids() local
80 while ((dir = readdir(proc))) { in pm_kernel_pids()
81 if (sscanf(dir->d_name, "%d", &pid) < 1) in pm_kernel_pids()
/system/extras/puncture_fs/
Dpuncture_fs.c121 static bool create_unique_dir(char *dir, const char * const root_path) { in create_unique_dir() argument
130 sprintf(dir, "%s/%s", root_path, random_string); in create_unique_dir()
132 if (mkdir(dir, 0777) < 0) { in create_unique_dir()
133 fprintf(stderr, "\nerrno: %d. Failed to create %s\n", errno, dir); in create_unique_dir()
/system/extras/perfprofd/
DAndroid.mk1 LOCAL_PATH:= $(call my-dir)
20 proto_header_dir := $(call local-generated-sources-dir)/proto/$(LOCAL_PATH)
/system/extras/tests/net_test/
Drun_net_test.sh92 dir=/host$(dirname $(readlink -f $0))
96 mem=512M init=/sbin/net_test.sh net_test=$dir/$test \
/system/core/
DAndroid.mk16 LOCAL_PATH := $(my-dir)
/system/extras/tests/lib/
DAndroid.mk17 LOCAL_PATH:= $(call my-dir)

123456789