/system/core/adb/ |
H A D | adb.c | 960 char path[PATH_MAX]; local 975 strftime(path, sizeof(path), 978 fd = unix_open(path, O_WRONLY | O_CREAT | O_TRUNC, 0640); 1079 /* get path of current program */ 1083 program_path, /* program path */ 1124 char path[PATH_MAX]; 1133 get_my_path(path, PATH_MAX); 1149 int result = execl(path, "adb", "-P", str_port, "fork-server", "server", NULL); 1292 // Our external storage path ma [all...] |
H A D | adb_auth_client.c | 110 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 D | adb_auth_host.c | 136 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 D | commandline.c | 92 " -p <product name or path> - simple product name like 'sooner', or\n" 93 " a relative/absolute path to a product\n" 97 " be an absolute path.\n" 178 " adb get-devpath - prints: <device-path>\n" 680 static int mkdirs(char *path) argument 683 char *x = path + 1; 689 ret = adb_mkdir(path, 0775); 858 * - A relative path from the CWD to the ANDROID_PRODUCT_OUT dir 860 * - An absolute path to the PRODUCT_OUT dir 863 * Given <hint>, try to construct an absolute path t [all...] |
H A D | file_sync_client.c | 77 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 D | file_sync_service.c | 56 static int do_stat(int s, const char *path) argument 63 if(lstat(path, &st)) { 76 static int do_list(int s, const char *path) argument 87 len = strlen(path); 88 memcpy(tmp, path, len); 94 d = opendir(path); 151 static int handle_send_file(int s, char *path, mode_t mode, char *buffer) argument 157 fd = adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL, mode); 159 mkdirs(path); 160 fd = adb_open_mode(path, O_WRONL 227 handle_send_link(int s, char *path, char *buffer) argument 276 do_send(int s, char *path, char *buffer) argument 319 do_recv(int s, const char *path, char *buffer) argument [all...] |
H A D | sysdeps.h | 90 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...] |
H A D | sysdeps_win32.c | 303 int adb_open(const char* path, int options) argument 332 f->fh_handle = CreateFile( path, desiredAccess, shareMode, NULL, OPEN_EXISTING, 337 D( "adb_open: could not open '%s':", path ); 345 D( "path not found\n" ); 356 snprintf( f->name, sizeof(f->name), "%d(%s)", _fh_to_int(f), path ); 357 D( "adb_open: '%s' => fd %d\n", path, _fh_to_int(f) ); 362 int adb_creat(const char* path, int mode) argument 372 f->fh_handle = CreateFile( path, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, 378 D( "adb_creat: could not open '%s':", path ); 386 D( "path no [all...] |
H A D | usb_vendors.c | 281 /* 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);
|
/system/core/charger/ |
H A D | charger.c | 134 const char *path; member in struct:uevent 249 static int read_file(const char *path, char *buf, size_t sz) argument 254 fd = open(path, O_RDONLY, 0); 276 static int read_file_int(const char *path, int *val) argument 283 ret = read_file(path, buf, sizeof(buf)); 331 const char *path, bool online) 342 "/sys/%s/capacity", path); 377 uevent->path = ""; 393 uevent->path = msg; 414 uevent->action, uevent->path, ueven 329 add_supply(struct charger *charger, const char *name, const char *type, const char *path, bool online) argument 428 char *path; local 591 coldboot(struct charger *charger, const char *path, const char *event) argument [all...] |
/system/core/cpio/ |
H A D | mkbootfs.c | 45 /* 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/debuggerd/ |
H A D | backtrace.c | 38 char path[PATH_MAX]; local 43 snprintf(path, sizeof(path), "/proc/%d/cmdline", pid); 44 if ((fp = fopen(path, "r"))) { 67 char path[PATH_MAX]; local 72 snprintf(path, sizeof(path), "/proc/%d/comm", tid); 73 if ((fp = fopen(path, "r"))) {
|
H A D | debuggerd.c | 162 char path[64]; local 163 snprintf(path, sizeof(path), "/proc/%d/status", tid); 165 FILE* fp = fopen(path, "r");
|
H A D | tombstone.c | 53 /* Must match the path defined in NativeCrashListener.java */ 197 char path[64]; local 202 snprintf(path, sizeof(path), "/proc/%d/comm", tid); 203 if ((fp = fopen(path, "r"))) { 218 snprintf(path, sizeof(path), "/proc/%d/cmdline", pid); 219 if ((fp = fopen(path, "r"))) { 730 * Returns the path of the tombstone file, allocated using malloc(). Caller must free() it. 747 char path[12 local 822 char* path = find_and_open_tombstone(&fd); local [all...] |
/system/core/fastboot/ |
H A D | fastboot.c | 120 void get_my_path(char *path); 126 char path[PATH_MAX + 128]; local 146 get_my_path(path); 147 sprintf(path + strlen(path), 149 return strdup(path); 158 sprintf(path, "%s/%s", dir, fn); 159 return strdup(path); 231 // require matching serial number or device path if requested 318 " or path t [all...] |
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/fs_mgr/ |
H A D | fs_mgr.c | 909 struct fstab_rec *fs_mgr_get_entry_for_mount_point(struct fstab *fstab, const char *path) argument 919 if (strncmp(path, fstab->recs[i].mount_point, len) == 0 && 920 (path[len] == '\0' || path[len] == '/')) {
|
H A D | fs_mgr_verity.c | 50 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 D | BatteryMonitor.cpp | 95 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/include/private/ |
H A D | android_filesystem_config.h | 185 ** 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 D | builtins.c | 56 static int write_file(const char *path, const char *value) argument 60 fd = open(path, O_WRONLY|O_CREAT|O_NOFOLLOW, 0600); 79 static int _open(const char *path) argument 83 fd = open(path, O_RDONLY | O_NOFOLLOW); 85 fd = open(path, O_WRONLY | O_NOFOLLOW); 90 static int _chown(const char *path, unsigned int uid, unsigned int gid) argument 95 fd = _open(path); 113 static int _chmod(const char *path, mode_t mode) argument 118 fd = _open(path); 298 /* mkdir <path> [mod 688 const char *path = args[1]; local [all...] |
H A D | devices.c | 60 const char *path; member in struct:uevent 86 char *path; member in struct:platform_node 163 static mode_t get_device_perm(const char *path, unsigned *uid, unsigned *gid) argument 178 if (strncmp(path, dp->name, strlen(dp->name))) 181 if (strcmp(path, dp->name)) 194 static void make_device(const char *path, argument 204 mode = get_device_perm(path, &uid, &gid) | (block ? S_IFBLK : S_IFCHR); 207 selabel_lookup(sehandle, &secontext, path, mode); 218 mknod(path, mode, dev); 219 chown(path, ui 228 add_platform_device(const char *path) argument 264 find_platform_device(const char *path) argument 281 remove_platform_device(const char *path) argument 479 handle_device(const char *action, const char *devpath, const char *path, int block, int major, int minor, char **links) argument 509 const char *path = uevent->path; local 881 coldboot(const char *path) argument [all...] |
H A D | property_service.c | 260 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 D | util.c | 292 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/libcorkscrew/ |
H A D | map_info.c | 135 char path[PATH_MAX]; local 140 snprintf(path, PATH_MAX, "/proc/%d/maps", tid); 141 fp = fopen(path, "r");
|