Searched defs:buf (Results 26 - 50 of 115) sorted by relevance

12345

/system/core/libcutils/
H A Dabort_socket.c166 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 Dashmem-host.c98 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 Dfs.c84 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 Dopen_memstream.c123 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 Ddir_hash.c57 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...]
/system/core/libsuspend/
H A Dautosuspend_wakeup_count.c43 char buf[80]; local
54 strerror_r(errno, buf, sizeof(buf));
55 ALOGE("Error reading from %s: %s\n", SYS_POWER_WAKEUP_COUNT, buf);
67 strerror_r(errno, buf, sizeof(buf));
68 ALOGE("Error waiting on semaphore: %s\n", buf);
75 strerror_r(errno, buf, sizeof(buf));
76 ALOGE("Error writing to %s: %s\n", SYS_POWER_WAKEUP_COUNT, buf);
98 char buf[80]; local
117 char buf[80]; local
142 char buf[80]; local
[all...]
/system/core/toolbox/
H A Ddate.c82 char buf[2000]; local
H A Dnotify.c27 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 Dreadtty.c60 char buf[1]; local
119 res = read(STDIN_FILENO, buf, 1);
138 if(accept && strchr(accept, buf[0]) == NULL) {
148 //if(!isprint(buf[0])) {
149 // fprintf(stderr, "got unprintable character 0x%x\n", buf[0]);
151 if(buf[0] == '\0') {
159 if(current_char && buf[0] != last_char_in) {
171 last_char_in = buf[0];
177 write(STDOUT_FILENO, buf, 1);
/system/extras/tests/ext4/
H A Drand_emmc_perf.c48 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/adb/
H A Dframebuffer_service.c59 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...]
H A Dremount_service.c41 char buf[4096]; local
47 buf[sizeof(buf) - 1] = '\0';
48 size = adb_read(fd, buf, sizeof(buf) - 1);
51 token = strtok(buf, delims);
H A Dadb_auth_client.c53 char buf[MAX_PAYLOAD]; local
63 while (fgets(buf, sizeof(buf), f)) {
71 sep = strpbrk(buf, " \t");
75 ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
109 struct stat buf; local
114 if (!stat(path, &buf)) {
H A Dadb_client.c136 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...]
/system/core/fastboot/
H A Dusbtest.c92 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/libmincrypt/
H A Drsa_e_3.c166 uint8_t buf[RSANUMBYTES]; local
173 if (len != sizeof(buf)) {
182 buf[i] = signature[i];
185 modpow3(key, buf);
189 if (buf[i] != padding[i]) {
196 if (buf[i] != *sha++) {
H A Drsa_e_f4.c159 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/libzipfile/
H A Dprivate.h23 const unsigned char *buf; member in struct:Zipfile
41 unsigned int read_le_int(const unsigned char* buf);
42 unsigned int read_le_short(const unsigned char* buf);
/system/extras/fatblock/
H A Dread.c28 static int buffer_read(char *buf, offset_t buf_len, char *out, argument
31 assert(buf);
47 memcpy(out, buf + off, len);
72 static int file_read(struct file *f, char *buf, offset_t off, offset_t len) argument
79 assert(buf);
114 ret = read(fd, buf, (size_t)len);
126 static int dir_read(struct dir *d, char *buf, offset_t off, offset_t len) argument
129 assert(buf);
131 return buffer_read((char*)d->entries, d->size, buf, off, len);
134 static int extent_read(struct fs *fs, struct extent *e, char *buf, argument
161 fs_read(struct fs *fs, char *buf, offset_t start, offset_t len) argument
[all...]
/system/extras/sane_schedstat/
H A Dsane_schedstat.c144 char buf[4096]; local
149 i = read(fd, buf, sizeof(buf) - 1);
151 buf[i] = '\0';
152 if (parse(buf)) return -1;
/system/extras/tests/bionic/libc/common/
H A Dtest_udp.c45 char buf[BUFLEN]; local
89 if (recvfrom(s, buf, BUFLEN, 0, (struct sockaddr*)&si_other, (socklen_t*)&slen)==-1)
92 inet_ntoa(si_other.sin_addr), ntohs(si_other.sin_port), buf);
112 sprintf(buf, "This is packet %d\n", i);
113 if (sendto(s, buf, BUFLEN, 0, (struct sockaddr*)&si_other, slen)==-1)
/system/bluetooth/bluedroid/
H A Dbluetooth.c51 char buf[16]; local
62 sz = read(fd, &buf, sizeof(buf));
64 if (sz >= 9 && memcmp(buf, "bluetooth", 9) == 0) {
/system/core/libion/
H A Dion_test.c110 char buf[CMSG_SPACE(sizeof(int))]; local
114 .msg_control = buf,
115 .msg_controllen = sizeof buf,
165 .msg_control = buf,
166 .msg_controllen = sizeof buf,
/system/core/liblog/
H A Dlogd_write.c194 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/libnl_2/
H A Dnetlink.c51 /* Receives a netlink message, allocates a buffer in *buf and stores
54 * *buf if a positive value is returned. Interrupted system calls are
58 unsigned char **buf, struct ucred **creds)
68 *buf = (unsigned char *) malloc(RECV_BUF_SIZE);
69 if (!(*buf)) {
75 recvmsg_iov.iov_base = *buf;
95 free(*buf);
96 *buf = NULL;
113 unsigned char *buf; local
120 rc = nl_recv(sk, &nla, &buf,
57 nl_recv(struct nl_sock *sk, struct sockaddr_nl *nla, \ unsigned char **buf, struct ucred **creds) argument
[all...]

Completed in 1691 milliseconds

12345