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

Function write_in_full

wrapper.c:305–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305ssize_t write_in_full(int fd, const void *buf, size_t count)
306{
307 const char *p = buf;
308 ssize_t total = 0;
309
310 while (count > 0) {
311 ssize_t written = xwrite(fd, p, count);
312 if (written < 0)
313 return -1;
314 if (!written) {
315 errno = ENOSPC;
316 return -1;
317 }
318 count -= written;
319 p += written;
320 total += written;
321 }
322
323 return total;
324}
325
326ssize_t pread_in_full(int fd, void *buf, size_t count, off_t offset)
327{

Callers 15

write_oidFunction · 0.85
write_sectionFunction · 0.85
write_pairFunction · 0.85
run_gpg_verifyFunction · 0.85
send_requestFunction · 0.85
send_fetch_requestFunction · 0.85
negotiate_using_fetchFunction · 0.85
write_entryFunction · 0.85
pre_push_hook_feed_stdinFunction · 0.85

Calls 1

xwriteFunction · 0.85

Tested by 6

do_send_queryFunction · 0.68
do_send_flushFunction · 0.68
cmd__deltaFunction · 0.68
test_stdin_pipe_feedFunction · 0.68
do_zlibFunction · 0.68