Lines Matching refs:bytes_read

444       size_t bytes_read = safe_read (fd, buffer, n);  in dump_remainder()  local
445 if (bytes_read == SAFE_READ_ERROR) in dump_remainder()
452 if (bytes_read == 0) in dump_remainder()
459 xwrite_stdout (buffer, bytes_read); in dump_remainder()
460 n_written += bytes_read; in dump_remainder()
463 n_remaining -= bytes_read; in dump_remainder()
522 size_t bytes_read; in file_lines() local
530 bytes_read = (pos - start_pos) % BUFSIZ; in file_lines()
531 if (bytes_read == 0) in file_lines()
532 bytes_read = BUFSIZ; in file_lines()
535 pos -= bytes_read; in file_lines()
537 bytes_read = safe_read (fd, buffer, bytes_read); in file_lines()
538 if (bytes_read == SAFE_READ_ERROR) in file_lines()
543 *read_pos = pos + bytes_read; in file_lines()
546 if (bytes_read && buffer[bytes_read - 1] != line_end) in file_lines()
553 size_t n = bytes_read; in file_lines()
565 xwrite_stdout (nl + 1, bytes_read - (n + 1)); in file_lines()
567 end_pos - (pos + bytes_read)); in file_lines()
585 bytes_read = safe_read (fd, buffer, BUFSIZ); in file_lines()
586 if (bytes_read == SAFE_READ_ERROR) in file_lines()
592 *read_pos = pos + bytes_read; in file_lines()
594 while (bytes_read > 0); in file_lines()
851 size_t bytes_read = safe_read (fd, buffer, BUFSIZ); in start_bytes() local
852 if (bytes_read == 0) in start_bytes()
854 if (bytes_read == SAFE_READ_ERROR) in start_bytes()
859 *read_pos += bytes_read; in start_bytes()
860 if (bytes_read <= n_bytes) in start_bytes()
861 n_bytes -= bytes_read; in start_bytes()
864 size_t n_remaining = bytes_read - n_bytes; in start_bytes()
888 size_t bytes_read = safe_read (fd, buffer, BUFSIZ); in start_lines() local
889 if (bytes_read == 0) /* EOF */ in start_lines()
891 if (bytes_read == SAFE_READ_ERROR) /* error */ in start_lines()
897 char *buffer_end = buffer + bytes_read; in start_lines()
899 *read_pos += bytes_read; in start_lines()
1165 uintmax_t bytes_read; in tail_forever() local
1275 bytes_read = dump_remainder (false, name, fd, bytes_to_read); in tail_forever()
1277 if (read_unchanged && bytes_read) in tail_forever()
1280 any_input |= (bytes_read != 0); in tail_forever()
1281 f[i].size += bytes_read; in tail_forever()
1432 uintmax_t bytes_read = dump_remainder (want_header, name, fspec->fd, in check_fspec() local
1434 fspec->size += bytes_read; in check_fspec()
1436 if (bytes_read) in check_fspec()