Home
last modified time | relevance | path

Searched refs:nread (Results 1 – 25 of 143) sorted by relevance

123456

/external/strace/
Ducopy.c109 unsigned int nread = 0; in umoven_peekdata() local
129 if (nread) { in umoven_peekdata()
131 nread, nread + len, addr - nread); in umoven_peekdata()
146 nread += m; in umoven_peekdata()
204 unsigned int nread = 0; in umovestr_peekdata() local
225 if (nread) { in umovestr_peekdata()
227 nread, nread + len, addr - nread); in umovestr_peekdata()
245 nread += m; in umovestr_peekdata()
277 unsigned int nread = 0; in umovestr() local
298 nread += r; in umovestr()
[all …]
/external/elfutils/libdwfl/
Dlinux-proc-maps.c72 ssize_t nread = pread_retry (fd, &buf, sizeof buf, 0); in get_pid_class() local
74 if (nread != sizeof buf || buf[EI_MAG0] != ELFMAG0 in get_pid_class()
112 ssize_t nread; in grovel_auxv() local
121 nread = pread_retry (fd, d.a64, sizeof d.a64, offset); in grovel_auxv()
122 if (nread < 0) in grovel_auxv()
128 for (size_t a32i = 0; a32i < nread / sizeof d.a32[0]; a32i++) in grovel_auxv()
141 for (size_t a64i = 0; a64i < nread / sizeof d.a64[0]; a64i++) in grovel_auxv()
154 offset += nread; in grovel_auxv()
156 while (nread == sizeof d.a64); in grovel_auxv()
218 int nread = -1; in proc_maps_report() local
[all …]
Delf-from-memory.c81 ssize_t nread = (*read_memory) (arg, buffer, ehdr_vma, in elf_from_remote_memory() local
83 if (nread <= 0) in elf_from_remote_memory()
88 __libdwfl_seterrno (nread < 0 ? DWFL_E_ERRNO : DWFL_E_TRUNCATED); in elf_from_remote_memory()
174 if ((size_t) nread >= phoff + phnum * phentsize) in elf_from_remote_memory()
192 nread = (*read_memory) (arg, buffer, ehdr_vma + phoff, in elf_from_remote_memory()
194 if (nread <= 0) in elf_from_remote_memory()
319 nread = (*read_memory) (arg, buffer + start, in elf_from_remote_memory()
322 return nread <= 0; in elf_from_remote_memory()
/external/curl/lib/
Dtransfer.c158 size_t nread; in Curl_fillreadbuffer() local
246 nread = readfunc(data->req.upload_fromhere, 1, in Curl_fillreadbuffer()
250 if(nread == CURL_READFUNC_ABORT) { in Curl_fillreadbuffer()
255 if(nread == CURL_READFUNC_PAUSE) { in Curl_fillreadbuffer()
276 else if(nread > buffersize) { in Curl_fillreadbuffer()
321 "%zx%s", nread, endofline_native); in Curl_fillreadbuffer()
325 nread += hexlen; in Curl_fillreadbuffer()
333 if((nread-hexlen) == 0 && in Curl_fillreadbuffer()
341 memcpy(data->req.upload_fromhere + nread, in Curl_fillreadbuffer()
354 length = nread; in Curl_fillreadbuffer()
[all …]
Dfile.c307 size_t nread; in file_upload() local
317 nread = readcount; in file_upload()
321 if((curl_off_t)nread <= data->state.resume_from) { in file_upload()
322 data->state.resume_from -= nread; in file_upload()
323 nread = 0; in file_upload()
328 nread -= (size_t)data->state.resume_from; in file_upload()
336 nwrite = write(fd, buf2, nread); in file_upload()
337 if(nwrite != nread) { in file_upload()
342 bytecount += nread; in file_upload()
504 ssize_t nread; in file_do() local
[all …]
Dhttp2.c208 ssize_t nread = -1; in http2_connisdead() local
211 nread = ((Curl_recv *)httpc->recv_underlying)( in http2_connisdead()
213 if(nread != -1) { in http2_connisdead()
216 (int)nread); in http2_connisdead()
218 httpc->inbuflen = nread; in http2_connisdead()
772 size_t nread; in on_data_chunk_recv() local
791 nread = CURLMIN(stream->len, len); in on_data_chunk_recv()
792 memcpy(&stream->mem[stream->memlen], data, nread); in on_data_chunk_recv()
794 stream->len -= nread; in on_data_chunk_recv()
795 stream->memlen += nread; in on_data_chunk_recv()
[all …]
Dsendf.c450 ssize_t nread; in Curl_recv_plain() local
453 nread = get_pre_recved(conn, num, buf, len); in Curl_recv_plain()
454 if(nread > 0) { in Curl_recv_plain()
456 return nread; in Curl_recv_plain()
459 nread = sread(sockfd, buf, len); in Curl_recv_plain()
462 if(-1 == nread) { in Curl_recv_plain()
487 return nread; in Curl_recv_plain()
689 ssize_t nread = sread(sockfd, buf, bytesfromsocket); in Curl_read_plain() local
691 if(-1 == nread) { in Curl_read_plain()
705 *n = nread; in Curl_read_plain()
[all …]
Dtelnet.c124 char *buffer, ssize_t nread);
1220 char *buffer, ssize_t nread) in send_telnet_data() argument
1229 for(i = 0; i < nread; i++) in send_telnet_data()
1232 outlen = nread + escapes; in send_telnet_data()
1234 if(outlen == nread) in send_telnet_data()
1238 outbuf = malloc(nread + escapes + 1); in send_telnet_data()
1243 for(i = 0; i < nread; i++) { in send_telnet_data()
1324 ssize_t nread; in telnet_do() local
1524 result = Curl_read(conn, sockfd, buf, data->set.buffer_size, &nread); in telnet_do()
1535 else if(nread <= 0) { in telnet_do()
[all …]
/external/ltp/testcases/kernel/syscalls/pread/
Dpread01.c104 int nread; /* no. of bytes read by pread() */ in main() local
118 nread = pread(fildes, read_buf[2], K1, K2); in main()
121 if (nread != K1) { in main()
123 "nread=%d, error:%d", nread, errno); in main()
136 nread = pread(fildes, read_buf[3], K1, K3); in main()
137 if (nread != K1) { in main()
139 "nread=%d, error:%d", nread, errno); in main()
150 if ((nread = read(fildes, read_buf[0], K1)) != K1) { in main()
152 "nread=%d, errno=%d", nread, errno); in main()
159 nread = pread(fildes, read_buf[1], K1, K1); in main()
[all …]
/external/toybox/toys/posix/
Dstrings.c41 int nread, i, wlen = TT.n, count = 0; local
52 for (i = nread = 0; ;i++) {
53 if (i >= nread) {
54 nread = read(fd, toybuf, sizeof(toybuf));
56 if (nread < 0) perror_msg_raw(filename);
57 if (nread < 1) {
/external/adhd/cras/src/tests/
Dloopback_iodev_unittest.cc104 unsigned int nread = 1024; in TEST_F() local
121 loop_in_->get_buffer(loop_in_, &area, &nread); in TEST_F()
122 EXPECT_EQ(480, nread); in TEST_F()
123 memset(buf_, 0, nread * kFrameBytes); in TEST_F()
124 rc = memcmp(area->channels[0].buf, buf_, nread * kFrameBytes); in TEST_F()
126 loop_in_->put_buffer(loop_in_, nread); in TEST_F()
137 unsigned int nread = 1024; in TEST_F() local
153 loop_in_->get_buffer(loop_in_, &area, &nread); in TEST_F()
154 EXPECT_EQ(nframes, nread); in TEST_F()
157 loop_in_->put_buffer(loop_in_, nread); in TEST_F()
Dcras_router.c80 int nread; in put_samples() local
82 nread = read(fd, buff, MIN(frames * frame_bytes, BUF_SIZE)); in put_samples()
83 if (nread <= 0) { in put_samples()
85 return nread; in put_samples()
88 memcpy(playback_samples, buff, nread); in put_samples()
89 return nread / frame_bytes; in put_samples()
/external/wpa_supplicant_8/src/wps/
Dhttpread.c370 int nread; in httpread_read_handler() local
380 nread = read(h->sd, readbuf, sizeof(readbuf)); in httpread_read_handler()
381 if (nread < 0) { in httpread_read_handler()
385 wpa_hexdump_ascii(MSG_MSGDUMP, "httpread - read", readbuf, nread); in httpread_read_handler()
386 if (nread == 0) { in httpread_read_handler()
425 if (nread == 0) in httpread_read_handler()
433 nread--; in httpread_read_handler()
480 if (nread == 0) in httpread_read_handler()
487 if (h->body_alloc_nbytes < (h->body_nbytes + nread + 1)) { in httpread_read_handler()
601 if (nread <= 0) in httpread_read_handler()
[all …]
/external/adhd/cras/examples/
Dcplay_buffer.c26 int nread; in main() local
39 nread = read(fd, buffer, 48000 * 4 * 5); in main()
40 if (nread <= 0) { in main()
43 return nread; in main()
54 rc = cras_helper_play_buffer(client, buffer, nread / 4, in main()
Dcplay.c32 int nread; in put_samples() local
34 nread = read(data->fd, playback_samples, frames * data->frame_bytes); in put_samples()
35 if (nread <= 0) in put_samples()
38 return nread / data->frame_bytes; in put_samples()
/external/adhd/cras/src/server/
Dcras_main_message.c64 int to_read, nread, rc; in read_main_message() local
67 nread = read(msg_fd, buf, sizeof(msg->length)); in read_main_message()
68 if (nread < 0) in read_main_message()
69 return nread; in read_main_message()
73 to_read = msg->length - nread; in read_main_message()
74 rc = read(msg_fd, &buf[0] + nread, to_read); in read_main_message()
Dcras_apm_list.c521 unsigned int writable, nframes, nread; in cras_apm_list_process() local
526 nread = float_buffer_level(input); in cras_apm_list_process()
527 if (nread < offset) { in cras_apm_list_process()
533 writable = MIN(nread - offset, writable); in cras_apm_list_process()
537 nread = nframes; in cras_apm_list_process()
539 rp = float_buffer_read_pointer(input, offset, &nread); in cras_apm_list_process()
555 memcpy(wp[i], rp[j], nread * sizeof(float)); in cras_apm_list_process()
558 nframes -= nread; in cras_apm_list_process()
559 offset += nread; in cras_apm_list_process()
561 float_buffer_written(apm->fbuffer, nread); in cras_apm_list_process()
[all …]
Dfloat_buffer.h90 unsigned int nread = buf_readable(b->buf); in float_buffer_read_pointer() local
95 } else if (offset >= nread) { in float_buffer_read_pointer()
100 *readable = MIN(*readable, nread - offset); in float_buffer_read_pointer()
123 unsigned int nread) in float_buffer_read() argument
125 buf_increment_read(b->buf, nread); in float_buffer_read()
/external/libunwind/src/
Dos-linux.h211 ssize_t i, nread; in maps_next() local
238 nread = read (mi->fd, mi->buf + bytes_left, in maps_next()
240 if (nread <= 0) in maps_next()
242 else if ((size_t) (nread + bytes_left) < mi->buf_size) in maps_next()
247 memmove (mi->buf_end - nread - bytes_left, mi->buf, in maps_next()
248 nread + bytes_left); in maps_next()
249 mi->buf = mi->buf_end - nread - bytes_left; in maps_next()
252 eol = mi->buf + bytes_left + nread - 1; in maps_next()
254 for (i = bytes_left; i < bytes_left + nread; ++i) in maps_next()
/external/curl/docs/examples/
Dsendrecv.c131 size_t nread; in main() local
133 nread = 0; in main()
134 res = curl_easy_recv(curl, buf, sizeof(buf), &nread); in main()
147 if(nread == 0) { in main()
153 (curl_off_t)nread); in main()
/external/libevent/
Devmap.c60 ev_uint16_t nread; member
257 entry->nread = 0; in evmap_io_init()
271 int nread, nwrite, nclose, retval = 0; in evmap_io_add_() local
289 nread = ctx->nread; in evmap_io_add_()
293 if (nread) in evmap_io_add_()
301 if (++nread == 1) in evmap_io_add_()
312 if (EVUTIL_UNLIKELY(nread > 0xffff || nwrite > 0xffff || nclose > 0xffff)) { in evmap_io_add_()
336 ctx->nread = (ev_uint16_t) nread; in evmap_io_add_()
352 int nread, nwrite, nclose, retval = 0; in evmap_io_del_() local
367 nread = ctx->nread; in evmap_io_del_()
[all …]
/external/libpcap/
Dsockutils.c847 ssize_t nread; local
873 nread = recv(sock, bufp, remaining, 0);
875 if (nread == -1)
885 if (nread == 0)
915 return (int) nread;
918 bufp += nread;
919 remaining -= nread;
934 ssize_t nread; local
962 nread = recv(sock, buffer, size, 0);
963 if (nread == SOCKET_ERROR)
[all …]
/external/libpng/contrib/arm-neon/
Dlinux-auxv.c46 unsigned int nread; in safe_read() local
54 nread = INT_MAX; in safe_read()
57 nread = (unsigned int)/*SAFE*/nbytes; in safe_read()
59 iread = read(fd, buffer, nread); in safe_read()
/external/ltp/testcases/kernel/syscalls/pipe/
Dpipe11.c40 size_t nread; in do_child() local
46 nread = SAFE_READ(0, fds[0], rbuf, sizeof(rbuf)); in do_child()
48 if (nread != read_per_child) { in do_child()
50 getpid(), nread); in do_child()
/external/libchrome/base/posix/
Dunix_domain_socket_unittest.cc121 const ssize_t nread = UnixDomainSocket::RecvMsgWithPid( in TEST() local
123 ASSERT_EQ(sizeof(kHello), static_cast<size_t>(nread)); in TEST()
150 const ssize_t nread = UnixDomainSocket::RecvMsgWithPid( in TEST() local
152 ASSERT_EQ(sizeof(kHello), static_cast<size_t>(nread)); in TEST()
174 const ssize_t nread = UnixDomainSocket::RecvMsgWithPid( in TEST() local
176 ASSERT_EQ(0, nread); in TEST()

123456