Searched refs:path (Results 26 - 50 of 81) sorted by path

1234

/system/core/init/
H A Dproperty_service.c324 char path[PATH_MAX]; local
327 snprintf(path, sizeof(path), "%s/%s", PERSISTENT_PROPERTY_DIR, name);
337 if (rename(tempPath, path)) {
339 ERROR("Unable to rename persistent property file %s to %s\n", tempPath, path);
534 char path[PATH_MAX]; local
547 snprintf(path, sizeof(path), "%s/%s", PERSISTENT_PROPERTY_DIR, entry->d_name);
548 fd = open(path, O_RDONLY);
555 ERROR("Unable to read persistent property file %s errno: %d\n", path, errn
[all...]
H A Dutil.c299 ERROR("path too long for mkdir_recursive\n");
350 char path[256]; local
352 ret = readlink(newpath, path, sizeof(path) - 1);
355 path[ret] = 0;
356 if (!strcmp(path, oldpath))
467 int make_dir(const char *path, mode_t mode) argument
475 selabel_lookup(sehandle, &secontext, path, mode);
480 rc = mkdir(path, mode);
H A Dutil.h42 int make_dir(const char *path, mode_t mode);
/system/core/libcorkscrew/
H A Dmap_info.c72 char path[PATH_MAX]; local
77 snprintf(path, PATH_MAX, "/proc/%d/maps", tid);
78 fp = fopen(path, "r");
/system/core/libcutils/
H A Ddir_hash.c36 * specified by path, using the specified algorithm. Returns the length
39 int get_file_hash(HashAlgorithm algorithm, const char *path, argument
52 if (stat(path, &sb) != 0) {
60 len = readlink(path, buf, sizeof(buf));
70 FILE *f = fopen(path, "rb");
H A Dfs.c33 int fs_prepare_dir(const char* path, mode_t mode, uid_t uid, gid_t gid) { argument
34 // Check if path needs to be created
36 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) {
40 ALOGE("Failed to lstat(%s): %s", path, strerror(errno));
47 ALOGE("Not a directory: %s", path);
57 if (TEMP_FAILURE_RETRY(mkdir(path, mode)) == -1) {
59 ALOGE("Failed to mkdir(%s): %s", path, strerror(errno));
65 if (TEMP_FAILURE_RETRY(chmod(path, mode)) == -1) {
66 ALOGE("Failed to chmod(%s, %d): %s", path, mode, strerror(errno));
69 if (TEMP_FAILURE_RETRY(chown(path, ui
77 fs_read_atomic_int(const char* path, int* out_value) argument
102 fs_write_atomic_int(const char* path, int value) argument
[all...]
/system/core/libsparse/
H A Dsimg_dump.py53 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/libusbhost/
H A Dusbhost.c131 char path[100]; local
140 snprintf(path, sizeof(path), "%s/%03d", USB_FS_DIR, i);
141 ret = inotify_add_watch(context->fd, path, IN_CREATE | IN_DELETE);
177 char path[100]; local
223 snprintf(path, sizeof(path), "%s/%s", USB_FS_DIR, event->name);
225 "new" : "gone", path, i);
228 ret = inotify_add_watch(context->fd, path,
232 done = find_existing_devices_bus(path, added_c
[all...]
/system/core/rootdir/etc/
H A Ddbus.conf11 <!-- Only listen on a local socket. (abstract=/path/to/socket
13 file; only Linux supports this. Use path=/whatever on other
15 <listen>unix:path=/dev/socket/dbus</listen>
/system/core/run-as/
H A Dpackage.c147 check_directory_ownership(const char* path, uid_t uid) argument
153 ret = lstat(path, &st);
179 /* This function is used to check the data directory path for safety.
182 * path is properly owned by the user ID.
191 /* the path should be absolute */
198 * directory separators in the input path and
199 * checking each sub-path independently
430 * <dataDir> is the path to the package's data directory (e.g. /data/data/com.example.foo)
479 /* fourth field is data directory path and must not contain
/system/core/sdcard/
H A Dsdcard.c204 /* Gets the absolute path to a node into the provided buffer.
206 * Populates 'buf' with the path and returns the length of the path on success,
207 * or returns -1 if the path is too long for the provided buffer.
230 /* Finds the absolute path of a file within a given directory.
231 * Performs a case-insensitive search for the file and sets the buffer to the path
233 * the buffer to the path that the file would have, assuming the name were case-sensitive.
235 * Populates 'buf' with the path and returns the actual name (within 'buf') on success,
236 * or returns NULL if the path is too long for the provided buffer.
238 static char* find_file_within(const char* path, cons argument
467 fuse_reply_entry(struct fuse* fuse, __u64 unique, struct node* parent, const char* name, const char* actual_name, const char* path) argument
496 fuse_reply_attr(struct fuse* fuse, __u64 unique, __u64 nid, const char* path) argument
557 char path[PATH_MAX]; local
575 char path[PATH_MAX]; local
805 char path[PATH_MAX]; local
883 char path[PATH_MAX]; local
949 char path[PATH_MAX]; local
[all...]
/system/core/sh/
H A Dcd.c82 const char *path; local
122 if (*dest == '/' || (path = bltinlookup("CDPATH", 1)) == NULL)
123 path = nullstr;
124 while ((p = padvance(&path, dest)) != NULL) {
162 * Check each component of the path. If we find a symlink or
209 * Get the next component of the path name pointed to by cdcomppath.
H A Deval.c696 const char *path = pathval(); local
790 * Modify the command lookup path, if a PATH= assignment
795 path = sp->text + sizeof(PATH) - 1;
799 find_command(argv[0], &cmdentry, cmd_flags, path);
820 path = syspath() + 5;
995 if (path != pathval() && (cmdentry.u.bltin == hashcmd ||
999 mklocal(path - 5 /* PATH= */, 0);
1065 shellexec(argv, envp, path, cmdentry.u.index, vforked);
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...]
H A Dmain.c332 * Take commands from a file. To be compatible we should do a path
341 const char *path = pathval(); local
348 while ((fullname = padvance(&path, basename)) != NULL) {
/system/core/toolbox/
H A Dchmod.c13 void recurse_chmod(char* path, int mode) argument
16 DIR *dir = opendir(path);
22 int pathlen = strlen(path);
29 fprintf(stderr, "Invalid path specified: too long\n");
33 strcpy(subpath, path);
H A Dload_policy.c16 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 Dls.c132 static int listfile_size(const char *path, const char *filename, int flags) argument
136 if (lstat(path, &s) < 0) {
137 fprintf(stderr, "lstat '%s' failed: %s\n", path, strerror(errno));
152 if (!stat(path, &link_dest)) {
155 fprintf(stderr, "stat '%s' failed: %s\n", path, strerror(errno));
166 static int listfile_long(const char *path, int flags) argument
175 /* name is anything after the final '/', or the whole path if none*/
176 name = strrchr(path, '/');
178 name = path;
183 if(lstat(path,
242 listfile_maclabel(const char *path, int flags) argument
[all...]
H A Dlsof.c53 char path[PATH_MAX]; member in struct:pid_info_t
76 strncat(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';
110 strncat(info->path, "maps", sizeof(info->path));
112 maps = fopen(info->path, "r");
130 info->path[inf
[all...]
H A Dmd5.c20 static int do_md5(const char *path) argument
27 fd = open(path, O_RDONLY);
29 fprintf(stderr,"could not open %s, %s\n", path, strerror(errno));
44 fprintf(stderr,"could not read %s, %s\n", path, strerror(errno));
50 fprintf(stderr,"could not close %s, %s\n", path, strerror(errno));
58 printf(" %s\n", path);
H A Dschedtop.c157 char path[1024]; local
160 sprintf(path, "/proc/%d/task", pid);
161 d = opendir(path);
H A Dumount.c28 static int is_loop_mount(const char* path, char *loopdev) argument
36 int path_length = strlen(path);
47 if (is_loop(device) && strcmp(path, mount_path) == 0) {
65 fprintf(stderr,"umount <path>\n");
H A Dwipe.c28 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/core/toolbox/grep/
H A Dfile.c235 grep_open(const char *path) argument
241 if (path == NULL) {
245 } else if ((f->fd = open(path, O_RDONLY)) == -1) {
H A Dgrep.h160 struct file *grep_open(const char *path);

Completed in 141 milliseconds

1234