Home
last modified time | relevance | path

Searched refs:n_read (Results 1 – 6 of 6) sorted by relevance

/coreutils/src/
Dhead.c203 size_t n_read = safe_read (src_fd, buf, n_to_read); in copy_fd() local
204 if (n_read == SAFE_READ_ERROR) in copy_fd()
207 n_bytes -= n_read; in copy_fd()
209 if (n_read == 0 && n_bytes != 0) in copy_fd()
212 xwrite_stdout (buf, n_read); in copy_fd()
302 size_t n_read = full_read (fd, b[i], n_to_read); in elide_tail_bytes_pipe() local
304 if (n_read < n_to_read) in elide_tail_bytes_pipe()
314 if (n_read <= n_elide) in elide_tail_bytes_pipe()
324 delta = n_elide - n_read; in elide_tail_bytes_pipe()
339 if (n_elide < n_read) in elide_tail_bytes_pipe()
[all …]
Dsplit.c320 ssize_t n_read = read (fd, buf + size, bufsize - size); in input_file_size() local
321 if (n_read <= 0) in input_file_size()
322 return n_read < 0 ? n_read : size; in input_file_size()
323 size += n_read; in input_file_size()
661 ssize_t n_read; in bytes_split() local
664 n_read = initial_read; in bytes_split()
666 eof = n_read < bufsize; in bytes_split()
677 n_read = read (STDIN_FILENO, buf, bufsize); in bytes_split()
678 if (n_read < 0) in bytes_split()
680 eof = n_read == 0; in bytes_split()
[all …]
Dcat.c165 size_t n_read = safe_read (input_desc, buf, bufsize); in simple_cat() local
166 if (n_read == SAFE_READ_ERROR) in simple_cat()
174 if (n_read == 0) in simple_cat()
179 if (full_write (STDOUT_FILENO, buf, n_read) != n_read) in simple_cat()
314 size_t n_read = safe_read (input_desc, inbuf, insize); in cat() local
315 if (n_read == SAFE_READ_ERROR) in cat()
322 if (n_read == 0) in cat()
333 eob = bpin + n_read; in cat()
Dtail.c619 size_t n_read; /* Size in bytes of most recent read */ in pipe_lines() local
629 n_read = safe_read (fd, tmp->buffer, BUFSIZ); in pipe_lines()
630 if (n_read == 0 || n_read == SAFE_READ_ERROR) in pipe_lines()
632 tmp->nbytes = n_read; in pipe_lines()
633 *read_pos += n_read; in pipe_lines()
639 char const *buffer_end = tmp->buffer + n_read; in pipe_lines()
679 if (n_read == SAFE_READ_ERROR) in pipe_lines()
757 size_t n_read; in pipe_bytes() local
767 n_read = safe_read (fd, tmp->buffer, BUFSIZ); in pipe_bytes()
768 if (n_read == 0 || n_read == SAFE_READ_ERROR) in pipe_bytes()
[all …]
Dcopy.c392 ssize_t n_read = read (src_fd, buf, MIN (max_n_read, buf_size)); in sparse_copy() local
393 if (n_read < 0) in sparse_copy()
400 if (n_read == 0) in sparse_copy()
402 max_n_read -= n_read; in sparse_copy()
403 *total_n_read += n_read; in sparse_copy()
410 while (n_read) in sparse_copy()
413 csize = MIN (csize, n_read); in sparse_copy()
419 bool last_chunk = (n_read == csize && ! make_hole) || ! csize; in sparse_copy()
447 n_read = 0; /* Finished processing buffer. */ in sparse_copy()
464 n_read -= csize; in sparse_copy()
[all …]
Dod.c1288 size_t n_read; in read_block() local
1291 n_read = fread (block + *n_bytes_in_buffer, 1, n_needed, in_stream); in read_block()
1293 *n_bytes_in_buffer += n_read; in read_block()
1295 if (n_read == n_needed) in read_block()