/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);
|
D | Volume.cpp | 185 int Volume::createDeviceNode(const char *path, int major, int minor) { in createDeviceNode() argument 188 if (mknod(path, mode, dev) < 0) { in createDeviceNode() 250 bool Volume::isMountpointMounted(const char *path) { in isMountpointMounted() argument 265 if (!strcmp(mount_path, path)) { in isMountpointMounted() 471 int Volume::doUnmount(const char *path, bool force) { in doUnmount() argument 475 SLOGD("Unmounting {%s}, force = %d", path, force); in doUnmount() 479 if (!umount(path) || errno == EINVAL || errno == ENOENT) { in doUnmount() 480 SLOGI("%s sucessfully unmounted", path); in doUnmount() 495 path, strerror(errno), retries, action); in doUnmount() 497 Process::killProcessesWithOpenFiles(path, action); in doUnmount() [all …]
|
D | Volume.h | 86 int createDeviceNode(const char *path, int major, int minor); 90 bool isMountpointMounted(const char *path); 92 int doUnmount(const char *path, bool force);
|
D | CommandListener.cpp | 380 char path[255]; in runCommand() local 382 if (!(rc = vm->getAsecMountPath(argv[2], path, sizeof(path)))) { in runCommand() 383 cli->sendMsg(ResponseCode::AsecPathResult, path, false); in runCommand() 444 char path[255]; in runCommand() local 446 if (!(rc = vm->getObbMountPath(argv[2], path, sizeof(path)))) { in runCommand() 447 cli->sendMsg(ResponseCode::AsecPathResult, path, false); in runCommand()
|
/system/core/toolbox/ |
D | lsof.c | 48 char path[PATH_MAX]; member 71 strncat(info->path, type, sizeof(info->path)); in print_type() 72 if ((link_dest_size = readlink(info->path, link_dest, sizeof(link_dest)-1)) < 0) { in print_type() 76 snprintf(link_dest, sizeof(link_dest), "%s (readlink: %s)", info->path, strerror(errno)); in print_type() 89 info->path[info->parent_length] = '\0'; in print_type() 104 strncat(info->path, "maps", sizeof(info->path)); in print_maps() 106 maps = fopen(info->path, "r"); in print_maps() 123 info->path[info->parent_length] = '\0'; in print_maps() 130 strncat(info->path, fd_path, sizeof(info->path)); in print_fds() 135 DIR *dir = opendir(info->path); in print_fds() [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 | umount.c | 13 static int is_loop_mount(const char* path) in is_loop_mount() argument 21 int path_length = strlen(path); in is_loop_mount() 32 if (strcmp(LOOP_DEVICE, device) == 0 && strcmp(path, mount_path) == 0) { in is_loop_mount()
|
D | ls.c | 122 static int listfile_size(const char *path, const char *filename, int flags) in listfile_size() argument 126 if (lstat(path, &s) < 0) { in listfile_size() 127 fprintf(stderr, "lstat '%s' failed: %s\n", path, strerror(errno)); in listfile_size() 136 static int listfile_long(const char *path, int flags) in listfile_long() argument 146 name = strrchr(path, '/'); in listfile_long() 148 name = path; in listfile_long() 153 if(lstat(path, &s) < 0) { in listfile_long() 183 len = readlink(path, linkto, 256); in listfile_long()
|
/system/core/adb/ |
D | sysdeps.h | 88 static __inline__ int adb_unlink(const char* path) in adb_unlink() argument 90 int rc = unlink(path); in adb_unlink() 95 rc = chmod(path, _S_IREAD|_S_IWRITE ); in adb_unlink() 97 rc = unlink(path); in adb_unlink() 104 static __inline__ int adb_mkdir(const char* path, int mode) in adb_mkdir() argument 106 return _mkdir(path); in adb_mkdir() 111 extern int adb_open(const char* path, int options); 112 extern int adb_creat(const char* path, int mode); 140 static __inline__ int adb_open_mode(const char* path, int options, int mode) in adb_open_mode() argument 142 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 …]
|
D | file_sync_client.c | 77 int sync_ls(int fd, const char *path, sync_ls_cb func, void *cookie) in sync_ls() argument 83 len = strlen(path); in sync_ls() 90 writex(fd, path, len)) { in sync_ls() 126 int sync_readtime(int fd, const char *path, unsigned *timestamp) in sync_readtime() argument 129 int len = strlen(path); in sync_readtime() 135 writex(fd, path, len)) { in sync_readtime() 151 static int sync_start_readtime(int fd, const char *path) in sync_start_readtime() argument 154 int len = strlen(path); in sync_start_readtime() 160 writex(fd, path, len)) { in sync_start_readtime() 185 int sync_readmode(int fd, const char *path, unsigned *mode) in sync_readmode() argument [all …]
|
D | usb_vendors.c | 190 char path[MAX_PATH]; in get_adb_usb_ini() local 191 SHGetFolderPath( NULL, CSIDL_PROFILE, NULL, 0, path); in get_adb_usb_ini() 192 return build_path(buff, len, "%s\\%s\\%s", path); in get_adb_usb_ini()
|
/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/core/sdcard/ |
D | sdcard.c | 177 char *path, buffer[PATH_BUFFER_SIZE]; in node_get_attr() local 179 path = node_get_path(node, buffer, 0); in node_get_attr() 180 res = lstat(path, &s); in node_get_attr() 182 ERROR("lstat('%s') errno %d\n", path, errno); in node_get_attr() 214 void fuse_init(struct fuse *fuse, int fd, const char *path) in fuse_init() argument 230 strcpy(fuse->root.name, path); in fuse_init() 279 char *path, buffer[PATH_BUFFER_SIZE]; in node_lookup() local 282 path = node_get_path(parent, buffer, name); in node_lookup() 285 res = lstat(path, &s); in node_lookup() 457 char *path, buffer[PATH_BUFFER_SIZE]; in handle_fuse_request() local [all …]
|
/system/core/init/ |
D | devices.c | 49 const char *path; member 161 static mode_t get_device_perm(const char *path, unsigned *uid, unsigned *gid) in get_device_perm() argument 176 if (strncmp(path, dp->name, strlen(dp->name))) in get_device_perm() 179 if (strcmp(path, dp->name)) in get_device_perm() 192 static void make_device(const char *path, in make_device() argument 201 mode = get_device_perm(path, &uid, &gid) | (block ? S_IFBLK : S_IFCHR); in make_device() 209 mknod(path, mode, dev); in make_device() 210 chown(path, uid, -1); in make_device() 235 uevent->path = ""; in parse_event() 250 uevent->path = msg; in parse_event() [all …]
|
D | property_service.c | 266 char path[PATH_MAX]; in write_persistent_property() local 269 snprintf(path, sizeof(path), "%s/%s", PERSISTENT_PROPERTY_DIR, name); in write_persistent_property() 279 if (rename(tempPath, path)) { in write_persistent_property() 281 ERROR("Unable to rename persistent property file %s to %s\n", tempPath, path); in write_persistent_property() 468 char path[PATH_MAX]; in load_persistent_properties() local 481 snprintf(path, sizeof(path), "%s/%s", PERSISTENT_PROPERTY_DIR, entry->d_name); in load_persistent_properties() 482 fd = open(path, O_RDONLY); in load_persistent_properties() 489 ERROR("Unable to read persistent property file %s errno: %d\n", path, errno); in load_persistent_properties() 493 ERROR("Unable to open persistent property file %s errno: %d\n", path, errno); in load_persistent_properties()
|
D | readme.txt | 116 device-added-<path> 117 device-removed-<path> 128 exec <path> [ <argument> ]* 129 Fork and execute a program (<path>). This will block until 151 chmod <octal-mode> <path> 154 chown <owner> <group> <path> 171 insmod <path> 172 Install the module at <path> 174 mkdir <path> [mode] [owner] [group] 175 Create a directory at <path>, optionally with the given mode, owner, and [all …]
|
/system/core/include/private/ |
D | android_filesystem_config.h | 203 static inline void fs_config(const char *path, int dir, in fs_config() argument 210 plen = strlen(path); in fs_config() 215 if(!strncmp(pc->prefix, path, len)) break; in fs_config() 220 if(!strncmp(pc->prefix, path, len - 1)) break; in fs_config() 222 if(!strncmp(pc->prefix, path, len)) break; in fs_config() 231 path, pc->prefix ? pc->prefix : "", *uid, *gid, *mode); in fs_config()
|
/system/netd/ |
D | main.cpp | 36 static void coldboot(const char *path); 115 static void coldboot(const char *path) in coldboot() argument 117 DIR *d = opendir(path); in coldboot()
|
/system/core/sh/ |
D | exec.c | 119 shellexec(char **argv, char **envp, const char *path, int idx, int vforked) in shellexec() argument 129 while ((cmdname = padvance(&path, argv[0])) != NULL) { in shellexec() 292 padvance(const char **path, const char *name) in padvance() argument 299 if (*path == NULL) in padvance() 301 start = *path; in padvance() 319 *path = p + 1; in padvance() 321 *path = NULL; in padvance() 380 const char *path; in printentry() local 386 path = pathval(); in printentry() 388 name = padvance(&path, cmdp->cmdname); in printentry() [all …]
|
/system/bluetooth/bluedroid/ |
D | bluetooth.c | 50 char path[64]; in init_rfkill() local 56 snprintf(path, sizeof(path), "/sys/class/rfkill/rfkill%d/type", id); in init_rfkill() 57 fd = open(path, O_RDONLY); in init_rfkill() 59 LOGW("open(%s) failed: %s (%d)\n", path, strerror(errno), errno); in init_rfkill()
|
/system/bluetooth/brcm_patchram_plus/ |
D | brcm_patchram_plus.c | 510 char path[PROPERTY_VALUE_MAX]; in read_default_bdaddr() local 513 property_get("ro.bt.bdaddr_path", path, ""); in read_default_bdaddr() 514 if (path[0] == 0) in read_default_bdaddr() 517 fd = open(path, O_RDONLY); in read_default_bdaddr() 519 fprintf(stderr, "open(%s) failed: %s (%d)", path, strerror(errno), in read_default_bdaddr() 526 fprintf(stderr, "read(%s) failed: %s (%d)", path, strerror(errno), in read_default_bdaddr() 531 fprintf(stderr, "read(%s) unexpected size %d", path, sz); in read_default_bdaddr()
|
/system/extras/ext4_utils/ |
D | make_ext4fs.c | 101 asprintf(&dentries[i].path, "%s/%s", dir_path, namelist[i]->d_name); in build_directory_structure() 123 fs_config(dentries[i].path, dir, &uid, &gid, &mode); in build_directory_structure() 150 error("unknown file type on %s", dentries[i].path); in build_directory_structure() 164 dentries[i].path, inode, android); in build_directory_structure() 168 error("unknown file type on %s", dentries[i].path); in build_directory_structure() 177 error("failed to set permissions on %s\n", dentries[i].path); in build_directory_structure() 179 free(dentries[i].path); in build_directory_structure()
|
/system/extras/tests/directiotest/ |
D | directiotest.c | 172 const char *path; in main() local 186 path = argv[1]; in main() 187 fd = open(path, O_RDWR | O_DIRECT | O_LARGEFILE); in main() 196 fprintf(stderr, "%s is not a block device\n", path); in main()
|