/system/core/adb/ |
H A D | usb_linux_client.c | 344 static int bulk_write(int bulk_in, const char *buf, size_t length) argument 350 ret = adb_write(bulk_in, buf + count, length - count); 378 static int bulk_read(int bulk_out, char *buf, size_t length) argument 384 ret = adb_read(bulk_out, buf + count, length - count);
|
H A D | usb_osx.c | 452 int usb_write(usb_handle *handle, const void *buf, int len) argument 474 handle->interface, handle->bulkOut, (void *)buf, len); 481 handle->interface, handle->bulkOut, (void *)buf, 0); 492 int usb_read(usb_handle *handle, void *buf, int len) argument 517 handle->bulkIn, buf, &numBytes);
|
/system/core/charger/ |
H A D | charger.c | 202 char *buf; local 210 buf = load_file(LAST_KMSG_PATH, &sz); 211 if (!buf || !sz) { 217 ptr = buf + (sz - len); 237 free(buf); 245 static int read_file(const char *path, char *buf, size_t sz) argument 254 cnt = read(fd, buf, sz - 1); 257 buf[cnt] = '\0'; 258 if (buf[cnt - 1] == '\n') { 260 buf[cn 274 char buf[32]; local [all...] |
/system/core/cpio/ |
H A D | mkbootfs.c | 257 char buf[1024]; local 259 size = readlink(in, buf, 1024); 261 _eject(&s, out, olen, buf, size);
|
/system/core/debuggerd/ |
H A D | debuggerd.c | 228 char buf[64]; local 230 snprintf(buf, sizeof buf, "/proc/%d/task/%d", out_request->pid, out_request->tid); 231 if(stat(buf, &s)) {
|
H A D | tombstone.c | 478 unsigned char buf[LOGGER_ENTRY_MAX_LEN + 1]; member in union:__anon289 483 ssize_t actual = read(logfd, log_entry.buf, LOGGER_ENTRY_MAX_LEN);
|
H A D | utility.c | 35 char buf[512]; local 42 vsnprintf(buf, sizeof(buf), fmt, ap); 43 len = strlen(buf); 44 write(log->tfd, buf, len);
|
/system/core/fastboot/ |
H A D | engine.c | 61 char buf[256]; local 66 vsprintf(buf, fmt, ap); 69 s = strdup(buf);
|
H A D | usbtest.c | 92 unsigned char buf[4096]; local 93 memset(buf, 0xee, 4096); 98 if(usb_write(usb, buf, arg_size) != arg_size) { 111 unsigned char buf[4096]; local 116 if(usb_read(usb, buf, arg_size) != arg_size) {
|
/system/core/fs_mgr/ |
H A D | fs_mgr.c | 176 static char *getline(char *buf, int size, FILE *file) argument 194 *(buf + cnt) = c; 204 *(buf + cnt) = '\0'; 208 return buf; 213 return buf; 223 *buf = '\0'; 224 return buf;
|
/system/core/include/mincrypt/ |
H A D | sha.h | 44 } buf; member in struct:SHA_CTX 46 uint8_t buf[64]; member in struct:SHA_CTX
|
/system/core/init/ |
H A D | devices.c | 130 char buf[512]; local 147 if ((strlen(upath) + strlen(dp->attr) + 6) > sizeof(buf)) 150 sprintf(buf,"/sys%s/%s", upath, dp->attr); 151 INFO("fixup %s %d %d 0%o\n", buf, dp->uid, dp->gid, dp->perm); 152 chown(buf, dp->uid, dp->gid); 153 chmod(buf, dp->perm); 415 char buf[256]; local 667 char buf[PAGE_SIZE]; local 670 nr = read(fw_fd, buf, sizeof(buf)); [all...] |
H A D | init.c | 828 int audit_callback(void *data, security_class_t cls, char *buf, size_t len) argument 830 snprintf(buf, len, "property=%s", !data ? "NULL" : (char *)data);
|
H A D | parser.c | 54 char buf[128]; local 57 snprintf(buf, 128, "%s: %d: ", state->filename, state->line); 58 buf[127] = 0; 59 off = strlen(buf); 62 vsnprintf(buf + off, 128 - off, fmt, ap); 64 buf[127] = 0; 65 ERROR("%s", buf);
|
H A D | util.c | 204 char buf[1024]; local 213 buf[sizeof(buf) - 1] = '\0'; 214 pmtdsize = read(fd, buf, sizeof(buf) - 1); 215 pmtdbufp = buf; 284 char buf[128]; local 298 if ((unsigned int)width > sizeof(buf) - 1) { 302 memcpy(buf, pathname, width); 303 buf[widt 327 char buf[256]; local [all...] |
/system/core/libcutils/ |
H A D | abort_socket.c | 166 int asocket_read(struct asocket *s, void *buf, size_t count, int timeout) { argument 199 ret = read(s->fd, buf, count); 211 int asocket_write(struct asocket *s, const void *buf, size_t count, argument 245 ret = write(s->fd, buf, count); 259 char buf = 0; local 266 ret = write(s->abort_fd[1], &buf, 1);
|
H A D | ashmem-dev.c | 51 char buf[ASHMEM_NAME_LEN]; local 53 strlcpy(buf, name, sizeof(buf)); 54 ret = ioctl(fd, ASHMEM_SET_NAME, buf);
|
H A D | ashmem-host.c | 98 struct stat buf; local 101 result = fstat(fd, &buf); 108 if (!(buf.st_nlink == 0 && S_ISREG(buf.st_mode))) { 113 return (int)buf.st_size; // TODO: care about overflow (> 2GB file)?
|
H A D | dir_hash.c | 57 char buf[PATH_MAX]; local 60 len = readlink(path, buf, sizeof(buf)); 66 SHA1Update(&context, (unsigned char *) buf, len); 69 char buf[10000]; local 79 while ((len = fread(buf, 1, sizeof(buf), f)) > 0) { 80 SHA1Update(&context, (unsigned char *) buf, len); 274 char *buf; local 303 buf [all...] |
H A D | fs.c | 84 char buf[BUF_SIZE]; local 85 if (TEMP_FAILURE_RETRY(read(fd, buf, BUF_SIZE)) == -1) { 89 if (sscanf(buf, "%d", out_value) != 1) { 115 char buf[BUF_SIZE]; local 116 int len = snprintf(buf, BUF_SIZE, "%d", value) + 1; 121 if (TEMP_FAILURE_RETRY(write(fd, buf, len)) < len) {
|
H A D | klog.c | 49 char buf[LOG_BUF_MAX]; local 56 vsnprintf(buf, LOG_BUF_MAX, fmt, ap); 57 buf[LOG_BUF_MAX - 1] = 0; 59 write(klog_fd, buf, strlen(buf));
|
H A D | open_memstream.c | 123 static int write_memstream(void* cookie, const char* buf, int size) argument 139 memcpy(*stream->bufp + stream->offset, buf, size); 285 char *buf; 292 stream = open_memstream(&buf, &len); 295 printf("buf=%s, len=%zu\n", buf, len); 301 printf("buf=%s, len=%zu\n", buf, len); 302 free(buf); 307 stream = open_memstream(&buf, [all...] |
H A D | partition_utils.c | 25 static int only_one_char(char *buf, int len, char c) argument 31 if (buf[i] != c) { 41 char buf[4096]; local 48 ret = read(fd, buf, sizeof(buf)); 51 if (ret != sizeof(buf)) { 56 if (only_one_char(buf, sizeof(buf), 0)) { 61 if (only_one_char(buf, sizeof(buf), [all...] |
H A D | sched_policy.c | 161 static int getSchedulerGroup(int tid, char* buf, size_t bufLen) argument 203 strncpy(buf, grp, len); 204 buf[len] = '\0';
|
H A D | tzstrftime.c | 354 char buf[INT_STRLEN_MAXIMUM( local 361 (void) sprintf(buf, "%ld", 363 else (void) sprintf(buf, "%lu", 365 pt = _add(buf, pt, ptlim, modifier); 627 char buf[INT_STRLEN_MAXIMUM(int) + 1]; local 629 (void) sprintf(buf, format, n); 630 return _add(buf, pt, ptlim, 0);
|