Searched defs:path (Results 26 - 50 of 64) sorted by relevance

123

/system/netd/
H A DNetdConstants.cpp110 int writeFile(const char *path, const char *value, int size) { argument
111 int fd = open(path, O_WRONLY);
113 ALOGE("Failed to open %s: %s", path, strerror(errno));
118 ALOGE("Failed to write %s: %s", path, strerror(errno));
126 int readFile(const char *path, char *buf, int *sizep) argument
128 int fd = open(path, O_RDONLY);
132 ALOGE("Failed to open %s: %s", path, strerror(errno));
138 ALOGE("Failed to write %s: %s", path, strerror(errno));
/system/core/adb/
H A Dadb_auth_client.c110 char *path; local
116 while ((path = *paths++)) {
117 if (!stat(path, &buf)) {
118 D("Loading keys from '%s'\n", path);
119 read_keys(path, list);
H A Dadb_auth_host.c136 char path[PATH_MAX], info[MAX_PAYLOAD]; local
139 ret = snprintf(path, sizeof(path), "%s.pub", private_key_path);
140 if (ret >= (signed)sizeof(path))
149 bfile = BIO_new_file(path, "w");
151 D("Failed to open '%s'\n", path);
155 D("Writing public key to '%s'\n", path);
266 char path[PATH_MAX]; local
269 SHGetFolderPath(NULL, CSIDL_PROFILE, NULL, 0, path);
270 home = path;
299 char path[PATH_MAX]; local
324 char *path; local
383 char path[PATH_MAX]; local
[all...]
H A Dusb_vendors.c281 /* builds the path to the adb vendor id file. returns 0 if success */
291 /* fills buff with the path to the adb vendor id file. returns 0 if success */
299 char path[MAX_PATH]; local
300 SHGetFolderPath( NULL, CSIDL_PROFILE, NULL, 0, path);
301 return build_path(buff, len, "%s\\%s\\%s", path);
H A Dfile_sync_client.c77 int sync_ls(int fd, const char *path, sync_ls_cb func, void *cookie) argument
83 len = strlen(path);
90 writex(fd, path, len)) {
126 int sync_readtime(int fd, const char *path, unsigned *timestamp) argument
129 int len = strlen(path);
135 writex(fd, path, len)) {
151 static int sync_start_readtime(int fd, const char *path) argument
154 int len = strlen(path);
160 writex(fd, path, len)) {
185 int sync_readmode(int fd, const char *path, unsigne argument
210 write_data_file(int fd, const char *path, syncsendbuf *sbuf) argument
273 write_data_link(int fd, const char *path, syncsendbuf *sbuf) argument
541 do_sync_ls(const char *path) argument
[all...]
H A Dsysdeps.h90 static __inline__ int adb_unlink(const char* path) argument
92 int rc = unlink(path);
97 rc = chmod(path, _S_IREAD|_S_IWRITE );
99 rc = unlink(path);
106 static __inline__ int adb_mkdir(const char* path, int mode) argument
108 return _mkdir(path);
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) argument
144 return adb_open(path, option
147 unix_open(const char* path, int options,...) argument
324 unix_open(const char* path, int options,...) argument
395 adb_unlink(const char* path) argument
402 adb_creat(const char* path, int mode) argument
486 adb_mkdir(const char* path, int mode) argument
497 adb_dirstart(const char* path) argument
502 adb_dirstop(const char* path) argument
[all...]
/system/core/cpio/
H A Dmkbootfs.c45 /* Each line in the canned file should be a path plus three ints (uid,
56 static void fix_stat(const char *path, struct stat *s) argument
69 if (strcmp(p->name, path) == 0) {
82 fs_config(path, S_ISDIR(s->st_mode), &s->st_uid, &s->st_gid, &s->st_mode, &capabilities);
/system/core/fs_mgr/
H A Dfs_mgr_verity.c50 static RSAPublicKey *load_key(char *path) argument
61 f = fopen(path, "r");
63 ERROR("Can't open '%s'\n", path);
/system/core/healthd/
H A DBatteryMonitor.cpp95 int BatteryMonitor::readFromFile(const String8& path, char* buf, size_t size) { argument
98 if (path.isEmpty())
100 int fd = open(path.string(), O_RDONLY, 0);
102 KLOG_ERROR(LOG_TAG, "Could not open '%s'\n", path.string());
119 BatteryMonitor::PowerSupplyType BatteryMonitor::readPowerSupplyType(const String8& path) { argument
122 int length = readFromFile(path, buf, SIZE);
147 bool BatteryMonitor::getBooleanField(const String8& path) { argument
152 if (readFromFile(path, buf, SIZE) > 0) {
161 int BatteryMonitor::getIntField(const String8& path) { argument
166 if (readFromFile(path, bu
216 String8 path; local
276 String8 path; local
[all...]
/system/core/libutils/
H A DProcessCallStack.cpp52 char path[PATH_MAX]; local
57 snprintf(path, sizeof(path), "/proc/%d/cmdline", pid);
58 if ((fp = fopen(path, "r"))) {
80 char path[PATH_MAX]; local
85 snprintf(path, sizeof(path), PATH_THREAD_NAME, tid);
86 if ((fp = fopen(path, "r"))) {
90 ALOGE("%s: Failed to open %s", __FUNCTION__, path);
/system/core/run-as/
H A Dpackage.c168 check_directory_ownership(const char* path, uid_t uid) argument
174 ret = lstat(path, &st);
200 /* This function is used to check the data directory path for safety.
203 * path is properly owned by the user ID.
212 /* the path should be absolute */
219 * directory separators in the input path and
220 * checking each sub-path independently
452 * <dataDir> is the path to the package's data directory (e.g. /data/data/com.example.foo)
502 /* fourth field is data directory path and must not contain
/system/core/toolbox/
H A Dls.c131 static int listfile_size(const char *path, const char *filename, struct stat *s, argument
134 if(!s || !path) {
149 if (!stat(path, &link_dest)) {
152 fprintf(stderr, "stat '%s' failed: %s\n", path, strerror(errno));
163 static int listfile_long(const char *path, struct stat *s, int flags) argument
171 if(!s || !path) {
175 /* name is anything after the final '/', or the whole path if none*/
176 name = strrchr(path, '/');
178 name = path;
214 len = readlink(path, linkt
238 listfile_maclabel(const char *path, struct stat *s, int flags) argument
[all...]
H A Dschedtop.c157 char path[1024]; local
160 sprintf(path, "/proc/%d/task", pid);
161 d = opendir(path);
/system/extras/fatblock/
H A Dimport.c95 static int import_file(struct fs *fs, char *path, struct imported *out) argument
102 ret = stat(path, &st);
104 WARN("importing %s: stat failed: %s\n", path, strerror(errno));
111 "out of memory\n", path);
116 path_copy = strdup(path);
118 WARN("importing %s: couldn't strdup path: out of memory\n",
119 path);
124 f->path = path_copy;
134 WARN("importing %s: couldn't allocate data extent\n", path);
193 static int import_dir(struct fs *fs, char *path, in argument
352 import_tree(struct fs *fs, char *path) argument
[all...]
/system/extras/tests/directiotest/
H A Ddirectiotest.c172 const char *path; local
186 path = argv[1];
187 fd = open(path, O_RDWR | O_DIRECT | O_LARGEFILE);
196 fprintf(stderr, "%s is not a block device\n", path);
/system/extras/tests/sdcard/
H A Dsdcard_perf_test.cpp609 char path[MAX_PATH]; local
611 strcpy(path, kTestDir);
616 // Go deeper by appending onto current path
617 snprintf(path + strlen(path), MAX_PATH - strlen(path), "/dir%d", i);
618 mkdir(path, S_IRWXU);
621 strcpy(filepath, path);
622 int pathlen = strlen(path);
/system/media/audio_utils/
H A Dtinysndfile.c62 static SNDFILE *sf_open_read(const char *path, SF_INFO *info) argument
64 FILE *stream = fopen(path, "rb");
66 fprintf(stderr, "fopen %s failed errno %d\n", path, errno);
242 static SNDFILE *sf_open_write(const char *path, SF_INFO *info) argument
253 FILE *stream = fopen(path, "w+b");
307 SNDFILE *sf_open(const char *path, int mode, SF_INFO *info) argument
309 if (path == NULL || info == NULL) {
310 fprintf(stderr, "path=%p info=%p\n", path, info);
315 return sf_open_read(path, inf
[all...]
/system/vold/
H A DCommandListener.cpp143 cli->sendMsg(ResponseCode::CommandSyntaxError, "Usage: volume mount <path>", false);
151 cli->sendMsg(ResponseCode::CommandSyntaxError, "Usage: volume unmount <path> [force|force_and_revert]", false);
167 cli->sendMsg(ResponseCode::CommandSyntaxError, "Usage: volume format <path> [wipe]", false);
178 "Usage: volume share <path> <method>", false);
185 "Usage: volume unshare <path> <method>", false);
193 "Usage: volume shared <path> <method>", false);
207 cli->sendMsg(ResponseCode::CommandSyntaxError, "Usage: volume mkdirs <path>", false);
406 } else if (!strcmp(argv[1], "path")) {
409 cli->sendMsg(ResponseCode::CommandSyntaxError, "Usage: asec path <container-id>", false);
412 char path[25 local
424 char path[255]; local
488 char path[255]; local
[all...]
H A DDirectVolume.cpp69 int DirectVolume::addPath(const char *path) { argument
70 mPaths->push_back(strdup(path));
395 * This is to change the sysfs path associated with a partition, in particular,
400 SLOGE("Cannot change path if there are more than one for a volume\n");
407 addPath(new_path); /* Put the new path on the list */
/system/core/debuggerd/
H A Ddebuggerd.c162 char path[64]; local
163 snprintf(path, sizeof(path), "/proc/%d/status", tid);
165 FILE* fp = fopen(path, "r");
/system/core/include/private/
H A Dandroid_filesystem_config.h185 ** should start with the most specific path and work their
214 ** should start with the most specific path and work their
264 static inline void fs_config(const char *path, int dir, argument
270 if (path[0] == '/') {
271 path++;
275 plen = strlen(path);
280 if(!strncmp(pc->prefix, path, len)) break;
285 if(!strncmp(pc->prefix, path, len - 1)) break;
287 if(!strncmp(pc->prefix, path, len)) break;
297 path, p
[all...]
/system/core/init/
H A Dproperty_service.c260 char path[PATH_MAX]; local
272 snprintf(path, sizeof(path), "%s/%s", PERSISTENT_PROPERTY_DIR, name);
273 if (rename(tempPath, path)) {
275 ERROR("Unable to rename persistent property file %s to %s\n", tempPath, path);
H A Dutil.c292 ERROR("path too long for mkdir_recursive\n");
356 char path[256]; local
358 ret = readlink(newpath, path, sizeof(path) - 1);
361 path[ret] = 0;
362 if (!strcmp(path, oldpath))
473 int make_dir(const char *path, mode_t mode) argument
480 selabel_lookup(sehandle, &secontext, path, mode);
484 rc = mkdir(path, mode);
/system/core/sh/
H A Dexec.c55 * This ensures that a full path search will not have to be done for them
99 STATIC int builtinloc = -1; /* index in path of %builtin, or -1 */
119 shellexec(char **argv, char **envp, const char *path, int idx, int vforked) argument
129 while ((cmdname = padvance(&path, argv[0])) != NULL) {
280 * Do a path search. The variable path (passed by reference) should be
281 * set to the start of the path before the first call; padvance will update
283 * the possible path expansions in sequence. If an option (indicated by
284 * a percent sign) appears in the path entry then the global variable
292 padvance(const char **path, cons argument
380 const char *path; local
427 find_command(char *name, struct cmdentry *entry, int act, const char *path) argument
1008 const char *path = pathval(); local
[all...]
/system/media/audio_route/
H A Daudio_route.c74 struct mixer_path *path; member in struct:config_parse_state
78 /* path functions */
86 static void path_print(struct audio_route *ar, struct mixer_path *path) argument
91 ALOGE("Path: %s, length: %d", path->name, path->length);
92 for (i = 0; i < path->length; i++) {
93 struct mixer_ctl *ctl = index_to_ctl(ar, path->setting[i].ctl_index);
96 for (j = 0; j < path->setting[i].num_values; j++)
97 ALOGE(" id=%d value=%d", j, path->setting[i].value[j]);
155 /* initialise the new mixer path */
165 find_ctl_index_in_path(struct mixer_path *path, unsigned int ctl_index) argument
177 alloc_path_setting(struct mixer_path *path) argument
205 path_add_setting(struct audio_route *ar, struct mixer_path *path, struct mixer_setting *setting) argument
232 path_add_value(struct audio_route *ar, struct mixer_path *path, struct mixer_value *mixer_value) argument
276 path_add_path(struct audio_route *ar, struct mixer_path *path, struct mixer_path *sub_path) argument
288 path_apply(struct audio_route *ar, struct mixer_path *path) argument
304 path_reset(struct audio_route *ar, struct mixer_path *path) argument
565 struct mixer_path *path; local
586 struct mixer_path *path; local
[all...]

Completed in 897 milliseconds

123