/system/vold/ |
H A D | Process.h | 24 static void killProcessesWithOpenFiles(const char *path, int action); 26 static int checkSymLink(int pid, const char *path, const char *name); 27 static int checkFileMaps(int pid, const char *path); 28 static int checkFileMaps(int pid, const char *path, char *openFilename, size_t max); 33 static int readSymLink(const char *path, char *link, size_t max); 34 static int pathMatchesMountPoint(const char *path, const char *mountPoint); 39 void vold_killProcessesWithOpenFiles(const char *path, int action);
|
H A D | Process.cpp | 35 int Process::readSymLink(const char *path, char *link, size_t max) { argument 39 if (lstat(path, &s) < 0) 45 length = readlink(path, link, max- 1); 52 int Process::pathMatchesMountPoint(const char* path, const char* mountPoint) { argument 54 if (length > 1 && strncmp(path, mountPoint, length) == 0) { 59 // there is one in the path to avoid partial matches. 60 return (path[length] == 0 || path[length] == '/'); 86 // compute path to process's directory of open files 87 char path[PATH_MA local 139 const char* path = strchr(buffer, '/'); local 155 char path[PATH_MAX]; local 173 vold_killProcessesWithOpenFiles(const char *path, int action) argument 184 killProcessesWithOpenFiles(const char *path, int action) argument [all...] |
/system/core/fastboot/ |
H A D | util_linux.c | 37 void get_my_path(char *path) argument 43 int err = readlink(proc, path, PATH_MAX - 1); 46 path[0] = 0; 48 path[err] = 0; 49 x = strrchr(path,'/');
|
/system/core/include/cutils/ |
H A D | fs.h | 45 extern int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid); 51 extern int fs_read_atomic_int(const char* path, int* value); 57 extern int fs_write_atomic_int(const char* path, int value); 60 * Ensure that all directories along given path exist, creating parent 61 * directories as needed. Validates that given path is absolute and that 62 * it contains no relative "." or ".." paths or symlinks. Last path segment 63 * is treated as filename and ignored, unless the path ends with "/". 65 extern int fs_mkdirs(const char* path, mode_t mode);
|
H A D | dir_hash.h | 21 int get_file_hash(HashAlgorithm algorithm, const char *path,
|
/system/core/libprocessgroup/ |
H A D | processgroup.cpp | 46 static int convertUidToPath(char *path, size_t size, uid_t uid) argument 48 return snprintf(path, size, "%s/%s%d", 54 static int convertUidPidToPath(char *path, size_t size, uid_t uid, int pid) argument 56 return snprintf(path, size, "%s/%s%d/%s%d", 67 char path[PROCESSGROUP_MAX_PATH_LEN] = {0}; local 68 convertUidPidToPath(path, sizeof(path), uid, pid); 69 strlcat(path, PROCESSGROUP_CGROUP_PROCS_FILE, sizeof(path)); 71 int fd = open(path, O_RDONL 150 char path[PROCESSGROUP_MAX_PATH_LEN] = {0}; local 168 char path[PROCESSGROUP_MAX_PATH_LEN]; local 196 char path[PROCESSGROUP_MAX_PATH_LEN]; local 278 mkdirAndChown(const char *path, mode_t mode, uid_t uid, gid_t gid) argument 299 char path[PROCESSGROUP_MAX_PATH_LEN] = {0}; local [all...] |
/system/core/healthd/ |
H A D | BatteryMonitor.cpp | 99 int BatteryMonitor::readFromFile(const String8& path, char* buf, size_t size) { argument 102 if (path.isEmpty()) 104 int fd = open(path.string(), O_RDONLY, 0); 106 KLOG_ERROR(LOG_TAG, "Could not open '%s'\n", path.string()); 123 BatteryMonitor::PowerSupplyType BatteryMonitor::readPowerSupplyType(const String8& path) { argument 126 int length = readFromFile(path, buf, SIZE); 151 bool BatteryMonitor::getBooleanField(const String8& path) { argument 156 if (readFromFile(path, buf, SIZE) > 0) { 165 int BatteryMonitor::getIntField(const String8& path) { argument 170 if (readFromFile(path, bu 215 String8 path; local 376 String8 path; local [all...] |
H A D | BatteryMonitor.h | 55 int readFromFile(const String8& path, char* buf, size_t size); 56 PowerSupplyType readPowerSupplyType(const String8& path); 57 bool getBooleanField(const String8& path); 58 int getIntField(const String8& path);
|
/system/extras/ext4_utils/ |
H A D | canned_fs_config.h | 23 void canned_fs_config(const char* path, int dir,
|
H A D | canned_fs_config.c | 28 const char* path; member in struct:__anon247 40 return strcmp(((Path*)a)->path, ((Path*)b)->path); 57 p->path = strdup(strtok(line, " ")); 83 void canned_fs_config(const char* path, int dir, argument 86 key.path = path+1; // canned paths lack the leading '/' 89 fprintf(stderr, "failed to find [%s] in canned fs_config\n", path); 102 fs_config(path, dir, &c_uid, &c_gid, &c_mode, &c_capabilities); 104 if (c_uid != *uid) printf("%s uid %d %d\n", path, *ui [all...] |
H A D | setup_fs.c | 14 char buf[256], path[128]; local 20 n = readlink(blockdev, path, sizeof(path) - 1); 22 path[n] = 0; 23 if (!memcmp(path, "/dev/block/", 11)) 24 blockdev = path + 11;
|
/system/core/toolbox/ |
H A D | load_policy.c | 16 const char *path; local 23 path = argv[1]; 24 fd = open(path, O_RDONLY); 26 fprintf(stderr, "Could not open %s: %s\n", path, strerror(errno)); 31 fprintf(stderr, "Could not stat %s: %s\n", path, strerror(errno)); 37 fprintf(stderr, "Could not mmap %s: %s\n", path, strerror(errno)); 43 fprintf(stderr, "Could not load %s: %s\n", path, strerror(errno));
|
H A D | lsof.c | 53 char path[PATH_MAX]; member in struct:pid_info_t 76 strlcat(info->path, type, sizeof(info->path)); 77 if ((link_dest_size = readlink(info->path, link_dest, sizeof(link_dest)-1)) < 0) { 81 snprintf(link_dest, sizeof(link_dest), "%s (readlink: %s)", info->path, strerror(errno)); 95 info->path[info->parent_length] = '\0'; 107 strlcat(info->path, "maps", sizeof(info->path)); 109 maps = fopen(info->path, "r"); 127 info->path[inf [all...] |
H A D | md5.c | 15 static int do_md5(const char *path) argument 22 fd = open(path, O_RDONLY); 24 fprintf(stderr,"could not open %s, %s\n", path, strerror(errno)); 38 fprintf(stderr,"could not read %s, %s\n", path, strerror(errno)); 44 fprintf(stderr,"could not close %s, %s\n", path, strerror(errno)); 52 printf(" %s\n", path);
|
H A D | mknod.c | 37 fprintf(stderr, "mknod <path> [b|c|u|p] <major> <minor>\n"); 42 char *path = NULL; local 54 path = argv[1]; 90 if (mknod(path, mode, makedev(major, minor))) {
|
H A D | wipe.c | 28 static void wipe (const char *path); 81 static void wipe (const char *path) argument 87 dir = opendir(path); 91 path, strerror(errno)); 97 strcpy(nameBuffer, path); 153 dir = opendir(path); 156 path, strerror(errno)); 161 strcpy(nameBuffer, path);
|
/system/media/audio_utils/ |
H A D | Android.mk | 17 LOCAL_C_INCLUDES += $(call include-path-for, speex) 19 $(call include-path-for, speex) \ 20 $(call include-path-for, audio-utils) 38 $(call include-path-for, audio-utils) 50 $(call include-path-for, audio-utils) 65 $(call include-path-for, audio-utils)
|
/system/core/adb/ |
H A D | adb_auth_host.c | 155 char path[PATH_MAX], info[MAX_PAYLOAD]; local 158 ret = snprintf(path, sizeof(path), "%s.pub", private_key_path); 159 if (ret >= (signed)sizeof(path)) 168 bfile = BIO_new_file(path, "w"); 170 D("Failed to open '%s'\n", path); 174 D("Writing public key to '%s'\n", path); 285 char path[PATH_MAX]; local 288 SHGetFolderPath(NULL, CSIDL_PROFILE, NULL, 0, path); 289 home = path; 318 char path[PATH_MAX]; local 343 char *path; local 402 char path[PATH_MAX]; local [all...] |
H A D | sysdeps.h | 91 static __inline__ int adb_unlink(const char* path) argument 93 int rc = unlink(path); 98 rc = chmod(path, _S_IREAD|_S_IWRITE ); 100 rc = unlink(path); 107 static __inline__ int adb_mkdir(const char* path, int mode) argument 109 return _mkdir(path); 114 extern int adb_open(const char* path, int options); 115 extern int adb_creat(const char* path, int mode); 143 static __inline__ int adb_open_mode(const char* path, int options, int mode) argument 145 return adb_open(path, option 148 unix_open(const char* path, int options,...) argument 327 unix_open(const char* path, int options,...) argument 398 adb_unlink(const char* path) argument 405 adb_creat(const char* path, int mode) argument 489 adb_mkdir(const char* path, int mode) argument 500 adb_dirstart(const char* path) argument 505 adb_dirstop(const char* path) argument [all...] |
H A D | file_sync_service.c | 83 static int do_stat(int s, const char *path) argument 90 if(lstat(path, &st)) { 103 static int do_list(int s, const char *path) argument 114 len = strlen(path); 115 memcpy(tmp, path, len); 121 d = opendir(path); 179 static int handle_send_file(int s, char *path, uid_t uid, argument 186 fd = adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL | O_CLOEXEC, mode); 188 if(mkdirs(path) != 0) { 193 fd = adb_open_mode(path, O_WRONL 274 handle_send_link(int s, char *path, char *buffer) argument 326 do_send(int s, char *path, char *buffer) argument 386 do_recv(int s, const char *path, char *buffer) argument [all...] |
/system/media/audio_route/ |
H A D | audio_route.c | 74 struct mixer_path *path; member in struct:config_parse_state 78 /* path functions */ 98 static void path_print(struct audio_route *ar, struct mixer_path *path) argument 103 ALOGE("Path: %s, length: %d", path->name, path->length); 104 for (i = 0; i < path->length; i++) { 105 struct mixer_ctl *ctl = index_to_ctl(ar, path->setting[i].ctl_index); 108 for (j = 0; j < path->setting[i].num_values; j++) 109 ALOGE(" id=%d value=%d", j, path->setting[i].value[j]); 167 /* initialise the new mixer path */ 177 find_ctl_index_in_path(struct mixer_path *path, unsigned int ctl_index) argument 189 alloc_path_setting(struct mixer_path *path) argument 217 path_add_setting(struct audio_route *ar, struct mixer_path *path, struct mixer_setting *setting) argument 244 path_add_value(struct audio_route *ar, struct mixer_path *path, struct mixer_value *mixer_value) argument 288 path_add_path(struct audio_route *ar, struct mixer_path *path, struct mixer_path *sub_path) argument 300 path_apply(struct audio_route *ar, struct mixer_path *path) argument 322 path_reset(struct audio_route *ar, struct mixer_path *path) argument 608 struct mixer_path *path; local 629 struct mixer_path *path; local 653 struct mixer_path *path; local [all...] |
/system/core/libcutils/ |
H A D | fs.c | 40 int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid) { argument 41 // Check if path needs to be created 43 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) { 47 ALOGE("Failed to lstat(%s): %s", path, strerror(errno)); 54 ALOGE("Not a directory: %s", path); 64 if (TEMP_FAILURE_RETRY(mkdir(path, mode)) == -1) { 66 ALOGE("Failed to mkdir(%s): %s", path, strerror(errno)); 72 if (TEMP_FAILURE_RETRY(chmod(path, mode)) == -1) { 73 ALOGE("Failed to chmod(%s, %d): %s", path, mode, strerror(errno)); 76 if (TEMP_FAILURE_RETRY(chown(path, ui 84 fs_read_atomic_int(const char* path, int* out_value) argument 109 fs_write_atomic_int(const char* path, int value) argument 153 fs_mkdirs(const char* path, mode_t mode) argument [all...] |
/system/media/audio_utils/spdif/ |
H A D | Android.mk | 12 LOCAL_C_INCLUDES += $(call include-path-for, audio-utils)
|
/system/netd/server/ |
H A D | InterfaceController.cpp | 50 char *path; local 55 asprintf(&path, "%s/%s/%s", ipv6_proc_path, interface, setting); 56 int success = writeFile(path, value, strlen(value)); 57 free(path); 143 char *path; local 148 asprintf(&path, "%s/%s/mtu", sys_net_path, interface); 149 int success = writeFile(path, mtu, strlen(mtu)); 150 free(path);
|
/system/core/toolbox/upstream-netbsd/bin/rmdir/ |
H A D | rmdir.c | 96 rm_path(char *path) argument 100 while ((p = strrchr(path, '/')) != NULL) { 106 if (rmdir(path) < 0) { 107 warn("%s", path);
|