| 29 | } |
| 30 | |
| 31 | static void flush(struct hashfile *f, const void *buf, unsigned int count) |
| 32 | { |
| 33 | if (0 <= f->check_fd && count) |
| 34 | verify_buffer_or_die(f, buf, count); |
| 35 | |
| 36 | if (write_in_full(f->fd, buf, count) < 0) { |
| 37 | if (errno == ENOSPC) |
| 38 | die("sha1 file '%s' write error. Out of diskspace", f->name); |
| 39 | die_errno("sha1 file '%s' write error", f->name); |
| 40 | } |
| 41 | |
| 42 | f->total += count; |
| 43 | display_throughput(f->tp, f->total); |
| 44 | } |
| 45 | |
| 46 | void hashflush(struct hashfile *f) |
| 47 | { |
no test coverage detected