/system/core/adb/ |
H A D | adb_client.c | 136 unsigned char buf[5]; local 139 if(readx(fd, buf, 4)) { 144 if(!memcmp(buf, "OKAY", 4)) { 148 if(memcmp(buf, "FAIL", 4)) { 151 buf[0], buf[1], buf[2], buf[3]); 155 if(readx(fd, buf, 4)) { 159 buf[ 230 char buf[100]; local 297 char buf[5]; local [all...] |
H A D | services.c | 81 unsigned char buf[4096]; local 93 if(readx(s, buf, xfer)) break; 94 if(writex(fd, buf, xfer)) break; 112 char buf[100]; local 116 snprintf(buf, sizeof(buf), "adbd is already running as root\n"); 117 writex(fd, buf, strlen(buf)); 122 snprintf(buf, sizeof(buf), "adb 137 char buf[100]; local 157 char buf[100]; local 167 char buf[100]; local [all...] |
H A D | test_track_devices.c | 17 unix_write( int fd, const char* buf, int len ) argument 21 int len2 = write(fd, buf, len); 29 buf += len2; 35 unix_read( int fd, char* buf, int len ) argument 39 int len2 = read(fd, buf, len); 47 buf += len2;
|
H A D | test_track_jdwp.c | 17 unix_write( int fd, const char* buf, int len ) argument 21 int len2 = write(fd, buf, len); 29 buf += len2; 35 unix_read( int fd, char* buf, int len ) argument 39 int len2 = read(fd, buf, len); 47 buf += len2;
|
H A D | framebuffer_service.c | 59 char buf[640]; local 167 for(i = 0; i < fbinfo.size; i += sizeof(buf)) { 168 if(readx(fd_screencap, buf, sizeof(buf))) goto done; 169 if(writex(fd, buf, sizeof(buf))) goto done; 171 if(readx(fd_screencap, buf, fbinfo.size % sizeof(buf))) goto done; 172 if(writex(fd, buf, fbinfo.size % sizeof(buf))) got [all...] |
/system/core/toolbox/ |
H A D | netstat.c | 77 static void addr2str(int af, const void *addr, unsigned port, char *buf) argument 79 if (inet_ntop(af, addr, buf, ADDR_LEN) == NULL) { 80 *buf = '\0'; 83 size_t len = strlen(buf); 85 snprintf(buf+len, ADDR_LEN-len, ":%d", port); 87 strncat(buf+len, ":*", ADDR_LEN-len-1); 96 char buf[BUFSIZ]; local 97 fgets(buf, BUFSIZ, fp); 98 while (fgets(buf, BUFSIZ, fp)){ 103 int n = sscanf(buf, " 123 char buf[BUFSIZ]; local [all...] |
H A D | notify.c | 27 char *buf; local 82 buf = malloc(width + 2); 116 read_len = read(ffd, buf, buflen); 118 if(read_len < buflen && buf[read_len-1] != '\n') { 119 buf[read_len] = '\n'; 123 buf[--read_len] = '\0'; 124 buf[--read_len] = '\n'; 125 buf[--read_len] = '.'; 126 buf[--read_len] = '.'; 127 buf[ [all...] |
H A D | hd.c | 14 unsigned char buf[4096]; local 67 read_len = sizeof(buf); 70 res = read(fd, &buf, read_len); 77 lsum += buf[i]; 78 sum += buf[i]; 79 printf("%02x ", buf[i]);
|
H A D | md5.c | 37 char buf[4096]; local 39 rlen = read(fd, buf, sizeof(buf)); 47 MD5_Update(&md5_ctx, buf, rlen);
|
/system/extras/tests/ext4/ |
H A D | rand_emmc_perf.c | 48 char buf[TST_BLK_SIZE] = { 0 }; local 108 if (write(fd, buf, sizeof(buf)) != sizeof(buf)) { 112 if (read(fd, buf, sizeof(buf)) != sizeof(buf)) {
|
/system/core/debuggerd/ |
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/include/cutils/ |
H A D | abort_socket.h | 83 int asocket_read(struct asocket *s, void *buf, size_t count, int timeout); 85 int asocket_write(struct asocket *s, const void *buf, size_t count,
|
/system/core/libcutils/ |
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 | 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 | 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) {
|
/system/core/sh/ |
H A D | eval.h | 45 char *buf; /* buffer */ member in struct:backcmd
|
H A D | output.c | 94 if (memout.buf != NULL) { 95 ckfree(memout.buf); 96 memout.buf = NULL; 155 } else if (dest->buf == NULL) { 157 dest->buf = ckmalloc(dest->bufsize); 158 dest->nextc = dest->buf; 165 dest->buf = ckrealloc(dest->buf, dest->bufsize); 167 dest->nextc = dest->buf + offset; 188 if (dest->buf 479 xwrite(int fd, char *buf, int nbytes) argument [all...] |
/system/netd/ |
H A D | InterfaceController.h | 24 char *buf; member in struct:android_wifi_priv_cmd
|
/system/core/init/ |
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/libzipfile/ |
H A D | test_zipfile.c | 13 void* buf;
local 44 buf = malloc(size);
45 fread(buf, 1, size, f);
47 zip = init_zipfile(buf, size);
90 free(buf);
|
/system/core/liblog/ |
H A D | logd_write.c | 194 char buf[LOG_BUF_SIZE]; local 196 vsnprintf(buf, LOG_BUF_SIZE, fmt, ap); 198 return __android_log_write(prio, tag, buf); 204 char buf[LOG_BUF_SIZE]; local 207 vsnprintf(buf, LOG_BUF_SIZE, fmt, ap); 210 return __android_log_write(prio, tag, buf); 216 char buf[LOG_BUF_SIZE]; local 219 vsnprintf(buf, LOG_BUF_SIZE, fmt, ap); 222 return __android_log_buf_write(bufID, prio, tag, buf); 228 char buf[LOG_BUF_SIZ local [all...] |
/system/core/libmincrypt/ |
H A D | rsa_e_f4.c | 159 uint8_t buf[RSANUMBYTES]; local 166 if (len != sizeof(buf)) { 175 buf[i] = signature[i]; 178 modpowF4(key, buf); // In-place exponentiation. 182 buf[i] ^= *sha++; 185 // Hash resulting buf, in-place. 186 SHA(buf, len, buf); 190 if (buf[i] != kExpectedPadShaRsa2048[i]) {
|
/system/core/include/zipfile/ |
H A D | zipfile.h | 48 int decompress_zipentry(zipentry_t entry, void* buf, int bufsize);
|