/system/vold/ |
D | Process.cpp | 35 int Process::readSymLink(const char *path, char *link, size_t max) { in readSymLink() argument 39 if (lstat(path, &s) < 0) in readSymLink() 45 length = readlink(path, link, max- 1); in readSymLink() 52 int Process::pathMatchesMountPoint(const char* path, const char* mountPoint) { in pathMatchesMountPoint() argument 54 if (length > 1 && strncmp(path, mountPoint, length) == 0) { in pathMatchesMountPoint() 60 return (path[length] == 0 || path[length] == '/'); in pathMatchesMountPoint() 87 char path[PATH_MAX]; in checkFileDescriptorSymLinks() local 88 sprintf(path, "/proc/%d/fd", pid); in checkFileDescriptorSymLinks() 89 DIR *dir = opendir(path); in checkFileDescriptorSymLinks() 94 int parent_length = strlen(path); in checkFileDescriptorSymLinks() [all …]
|
D | Process.h | 22 static void killProcessesWithOpenFiles(const char *path, int action); 24 static int checkSymLink(int pid, const char *path, const char *name); 25 static int checkFileMaps(int pid, const char *path); 26 static int checkFileMaps(int pid, const char *path, char *openFilename, size_t max); 31 static int readSymLink(const char *path, char *link, size_t max); 32 static int pathMatchesMountPoint(const char *path, const char *mountPoint);
|
/system/core/libcutils/ |
D | fs.c | 34 int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid) { in fs_prepare_dir() argument 37 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) { in fs_prepare_dir() 41 ALOGE("Failed to lstat(%s): %s", path, strerror(errno)); in fs_prepare_dir() 48 ALOGE("Not a directory: %s", path); in fs_prepare_dir() 58 if (TEMP_FAILURE_RETRY(mkdir(path, mode)) == -1) { in fs_prepare_dir() 60 ALOGE("Failed to mkdir(%s): %s", path, strerror(errno)); in fs_prepare_dir() 66 if (TEMP_FAILURE_RETRY(chmod(path, mode)) == -1) { in fs_prepare_dir() 67 ALOGE("Failed to chmod(%s, %d): %s", path, mode, strerror(errno)); in fs_prepare_dir() 70 if (TEMP_FAILURE_RETRY(chown(path, uid, gid)) == -1) { in fs_prepare_dir() 71 ALOGE("Failed to chown(%s, %d, %d): %s", path, uid, gid, strerror(errno)); in fs_prepare_dir() [all …]
|
/system/core/toolbox/ |
D | lsof.c | 53 char path[PATH_MAX]; member 76 strncat(info->path, type, sizeof(info->path)); in print_type() 77 if ((link_dest_size = readlink(info->path, link_dest, sizeof(link_dest)-1)) < 0) { in print_type() 81 snprintf(link_dest, sizeof(link_dest), "%s (readlink: %s)", info->path, strerror(errno)); in print_type() 95 info->path[info->parent_length] = '\0'; in print_type() 110 strncat(info->path, "maps", sizeof(info->path)); in print_maps() 112 maps = fopen(info->path, "r"); in print_maps() 130 info->path[info->parent_length] = '\0'; in print_maps() 137 strncat(info->path, fd_path, sizeof(info->path)); in print_fds() 142 DIR *dir = opendir(info->path); in print_fds() [all …]
|
D | load_policy.c | 16 const char *path; in load_policy_main() local 23 path = argv[1]; in load_policy_main() 24 fd = open(path, O_RDONLY); in load_policy_main() 26 fprintf(stderr, "Could not open %s: %s\n", path, strerror(errno)); in load_policy_main() 31 fprintf(stderr, "Could not stat %s: %s\n", path, strerror(errno)); in load_policy_main() 37 fprintf(stderr, "Could not mmap %s: %s\n", path, strerror(errno)); in load_policy_main() 43 fprintf(stderr, "Could not load %s: %s\n", path, strerror(errno)); in load_policy_main()
|
D | md5.c | 20 static int do_md5(const char *path) in do_md5() argument 27 fd = open(path, O_RDONLY); in do_md5() 29 fprintf(stderr,"could not open %s, %s\n", path, strerror(errno)); in do_md5() 44 fprintf(stderr,"could not read %s, %s\n", path, strerror(errno)); in do_md5() 50 fprintf(stderr,"could not close %s, %s\n", path, strerror(errno)); in do_md5() 58 printf(" %s\n", path); in do_md5()
|
D | ls.c | 130 static int listfile_size(const char *path, const char *filename, int flags) in listfile_size() argument 134 if (lstat(path, &s) < 0) { in listfile_size() 135 fprintf(stderr, "lstat '%s' failed: %s\n", path, strerror(errno)); in listfile_size() 150 if (!stat(path, &link_dest)) { in listfile_size() 153 fprintf(stderr, "stat '%s' failed: %s\n", path, strerror(errno)); in listfile_size() 164 static int listfile_long(const char *path, int flags) in listfile_long() argument 174 name = strrchr(path, '/'); in listfile_long() 176 name = path; in listfile_long() 181 if(lstat(path, &s) < 0) { in listfile_long() 216 len = readlink(path, linkto, 256); in listfile_long() [all …]
|
D | wipe.c | 28 static void wipe (const char *path); 81 static void wipe (const char *path) in wipe() argument 87 dir = opendir(path); in wipe() 91 path, strerror(errno)); in wipe() 97 strcpy(nameBuffer, path); in wipe() 153 dir = opendir(path); in wipe() 156 path, strerror(errno)); in wipe() 161 strcpy(nameBuffer, path); in wipe()
|
D | chmod.c | 13 void recurse_chmod(char* path, int mode) in recurse_chmod() argument 16 DIR *dir = opendir(path); in recurse_chmod() 22 int pathlen = strlen(path); in recurse_chmod() 33 strcpy(subpath, path); in recurse_chmod()
|
/system/media/audio_route/ |
D | audio_route.c | 80 struct mixer_path *path; member 86 static void path_print(struct mixer_path *path) in path_print() argument 91 ALOGE("Path: %s, length: %d", path->name, path->length); in path_print() 92 for (i = 0; i < path->length; i++) { in path_print() 94 mixer_ctl_get_name(path->setting[i].ctl), in path_print() 95 path->setting[i].linked ? 'y' : 'n'); in path_print() 96 for (j = 0; j < path->setting[i].num_values; j++) in path_print() 97 ALOGE(" id=%d value=%d", j, path->setting[i].value[j]); in path_print() 165 static int find_ctl_in_path(struct mixer_path *path, struct mixer_ctl *ctl) in find_ctl_in_path() argument 169 for (i = 0; i < path->length; i++) in find_ctl_in_path() [all …]
|
/system/core/adb/ |
D | adb_auth_host.c | 136 char path[PATH_MAX], info[MAX_PAYLOAD]; in write_public_keyfile() local 139 ret = snprintf(path, sizeof(path), "%s.pub", private_key_path); in write_public_keyfile() 140 if (ret >= (signed)sizeof(path)) in write_public_keyfile() 149 bfile = BIO_new_file(path, "w"); in write_public_keyfile() 151 D("Failed to open '%s'\n", path); in write_public_keyfile() 155 D("Writing public key to '%s'\n", path); in write_public_keyfile() 266 char path[PATH_MAX]; in get_user_keyfilepath() local 269 SHGetFolderPath(NULL, CSIDL_PROFILE, NULL, 0, path); in get_user_keyfilepath() 270 home = path; in get_user_keyfilepath() 299 char path[PATH_MAX]; in get_user_key() local [all …]
|
D | sysdeps.h | 90 static __inline__ int adb_unlink(const char* path) in adb_unlink() argument 92 int rc = unlink(path); in adb_unlink() 97 rc = chmod(path, _S_IREAD|_S_IWRITE ); in adb_unlink() 99 rc = unlink(path); in adb_unlink() 106 static __inline__ int adb_mkdir(const char* path, int mode) in adb_mkdir() argument 108 return _mkdir(path); in adb_mkdir() 113 extern int adb_open(const char* path, int options); 114 extern int adb_creat(const char* path, int mode); 142 static __inline__ int adb_open_mode(const char* path, int options, int mode) in adb_open_mode() argument 144 return adb_open(path, options); in adb_open_mode() [all …]
|
D | file_sync_service.c | 56 static int do_stat(int s, const char *path) in do_stat() argument 63 if(lstat(path, &st)) { in do_stat() 76 static int do_list(int s, const char *path) in do_list() argument 87 len = strlen(path); in do_list() 88 memcpy(tmp, path, len); in do_list() 94 d = opendir(path); in do_list() 151 static int handle_send_file(int s, char *path, mode_t mode, char *buffer) in handle_send_file() argument 157 fd = adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL, mode); in handle_send_file() 159 mkdirs(path); in handle_send_file() 160 fd = adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL, mode); in handle_send_file() [all …]
|
/system/core/init/ |
D | devices.c | 60 const char *path; member 86 char *path; member 154 static mode_t get_device_perm(const char *path, unsigned *uid, unsigned *gid) in get_device_perm() argument 169 if (strncmp(path, dp->name, strlen(dp->name))) in get_device_perm() 172 if (strcmp(path, dp->name)) in get_device_perm() 185 static void make_device(const char *path, in make_device() argument 195 mode = get_device_perm(path, &uid, &gid) | (block ? S_IFBLK : S_IFCHR); in make_device() 198 selabel_lookup(sehandle, &secontext, path, mode); in make_device() 209 mknod(path, mode, dev); in make_device() 210 chown(path, uid, -1); in make_device() [all …]
|
/system/extras/fatblock/ |
D | import.c | 95 static int import_file(struct fs *fs, char *path, struct imported *out) in import_file() argument 102 ret = stat(path, &st); in import_file() 104 WARN("importing %s: stat failed: %s\n", path, strerror(errno)); in import_file() 111 "out of memory\n", path); in import_file() 116 path_copy = strdup(path); in import_file() 119 path); in import_file() 124 f->path = path_copy; in import_file() 134 WARN("importing %s: couldn't allocate data extent\n", path); in import_file() 193 static int import_dir(struct fs *fs, char *path, int is_root, in import_dir() argument 215 dir = opendir(path); in import_dir() [all …]
|
D | read.c | 59 ret = stat(f->path, &st); in file_check_metadata() 62 f->path, strerror(errno)); in file_check_metadata() 84 f->path, off, len); in file_read() 91 f->path, off, len); in file_read() 97 f->path, off, len); in file_read() 101 fd = fdpool_open(&f->pfd, f->path, O_RDONLY); in file_read() 103 WARN("reading %s: open failed: %s\n", f->path, strerror(errno)); in file_read() 110 f->path, off, len, strerror(errno)); in file_read() 117 f->path, off, len, strerror(errno)); in file_read()
|
D | fatblock.h | 46 char *path; member 59 char *path; member 67 int import_tree(struct fs *fs, char *path);
|
/system/core/fastboot/ |
D | util_linux.c | 37 void get_my_path(char *path) in get_my_path() argument 43 int err = readlink(proc, path, PATH_MAX - 1); in get_my_path() 46 path[0] = 0; in get_my_path() 48 path[err] = 0; in get_my_path() 49 x = strrchr(path,'/'); in get_my_path()
|
/system/extras/ext4_utils/ |
D | setup_fs.c | 14 char buf[256], path[128]; in setup_fs() local 20 n = readlink(blockdev, path, sizeof(path) - 1); in setup_fs() 22 path[n] = 0; in setup_fs() 23 if (!memcmp(path, "/dev/block/", 11)) in setup_fs() 24 blockdev = path + 11; in setup_fs()
|
/system/media/audio_utils/ |
D | Android.mk | 14 LOCAL_C_INCLUDES += $(call include-path-for, speex) 16 $(call include-path-for, speex) \ 17 $(call include-path-for, audio-utils) 32 $(call include-path-for, audio-utils) 44 $(call include-path-for, audio-utils) 59 $(call include-path-for, audio-utils)
|
/system/core/libsparse/ |
D | simg_dump.py | 53 for path in args: 54 FH = open(path, 'rb') 70 % (me, path, magic)) 74 % (me, path, major_version, minor_version)) 78 % (me, path, file_hdr_sz)) 82 % (me, path, chunk_hdr_sz)) 86 % (path, total_blks, blk_sz, total_chunks))
|
/system/core/debuggerd/ |
D | backtrace.c | 38 char path[PATH_MAX]; in dump_process_header() local 43 snprintf(path, sizeof(path), "/proc/%d/cmdline", pid); in dump_process_header() 44 if ((fp = fopen(path, "r"))) { in dump_process_header() 67 char path[PATH_MAX]; in dump_thread() local 72 snprintf(path, sizeof(path), "/proc/%d/comm", tid); in dump_thread() 73 if ((fp = fopen(path, "r"))) { in dump_thread()
|
/system/core/include/cutils/ |
D | fs.h | 44 extern int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid); 50 extern int fs_read_atomic_int(const char* path, int* value); 56 extern int fs_write_atomic_int(const char* path, int value);
|
/system/core/include/private/ |
D | android_filesystem_config.h | 249 static inline void fs_config(const char *path, int dir, in fs_config() argument 255 if (path[0] == '/') { in fs_config() 256 path++; in fs_config() 260 plen = strlen(path); in fs_config() 265 if(!strncmp(pc->prefix, path, len)) break; in fs_config() 270 if(!strncmp(pc->prefix, path, len - 1)) break; in fs_config() 272 if(!strncmp(pc->prefix, path, len)) break; in fs_config() 282 path, pc->prefix ? pc->prefix : "", *uid, *gid, *mode); in fs_config()
|
/system/media/camera/docs/ |
D | metadata_helpers.py | 109 path = node.find_parents(fltr) 110 path = list(path) 111 path.reverse() 112 path.append(node) 114 return ".".join((i.name for i in path))
|