MCPcopy Index your code
hub / github.com/git/git / copy_fd

Function copy_fd

copy.c:10–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include "abspath.h"
9
10int copy_fd(int ifd, int ofd)
11{
12 while (1) {
13 char buffer[8192];
14 ssize_t len = xread(ifd, buffer, sizeof(buffer));
15 if (!len)
16 break;
17 if (len < 0)
18 return COPY_READ_ERROR;
19 if (write_in_full(ofd, buffer, len) < 0)
20 return COPY_WRITE_ERROR;
21 }
22 return 0;
23}
24
25static int copy_times(const char *dst, const char *src)
26{

Callers 4

copy_fileFunction · 0.85
filter_buffer_or_fdFunction · 0.85
print_file_to_stdoutFunction · 0.85
bisect_logFunction · 0.85

Calls 2

xreadFunction · 0.85
write_in_fullFunction · 0.85

Tested by

no test coverage detected