#include #include #include #include #include "ioexact.h" extern volatile sig_atomic_t sigint; ssize_t read_exact(int fd, void *buf, size_t len, bool mayexit) { ssize_t num = 0, written; while (len > 0 && !sigint) { if ((written = read(fd, buf, len)) < 0) { if (errno == EAGAIN && num > 0) continue; if (mayexit) return -1; else continue; } if (!written) return 0; len -= written; buf += written; num += written; } return num; } ssize_t write_exact(int fd, void *buf, size_t len, bool mayexit) { ssize_t num = 0, written; while (len > 0 && !sigint) { if ((written = write(fd, buf, len)) < 0) { if (errno == EAGAIN && num > 0) continue; if (mayexit) return -1; else continue; } if (!written) return 0; len -= written; buf += written; num += written; } return num; } alue='1f8f1e89e0183e9504dfa45e9b87c44cff2e66c6'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Expand)AuthorFilesLines
2017-02-10bpf: Add test_tag to .gitignoreMickaël Salaün1-0/+1
2017-02-10bpf: Remove bpf_sys.h from selftestsMickaël Salaün7-34/+9
2017-02-10bpf: Use bpf_create_map() from the libraryMickaël Salaün6-30/+15
2017-02-10bpf: Use bpf_map_get_next_key() from the libraryMickaël Salaün5-31/+20
2017-02-10bpf: Use bpf_map_delete_elem() from the libraryMickaël Salaün5-26/+16
2017-02-10bpf: Use bpf_map_lookup_elem() from the libraryMickaël Salaün6-50/+39
2017-02-10bpf: Use bpf_map_update_elem() from the libraryMickaël Salaün6-91/+99
2017-02-10bpf: Use bpf_load_program() from the libraryMickaël Salaün6-32/+17
2017-02-10bpf: Always test unprivileged programsMickaël Salaün2-6/+64
2017-02-10bpf: Change the include directory for selftestMickaël Salaün1-1/+1
2017-02-10tools: Sync {,tools/}include/uapi/linux/bpf.hMickaël Salaün1-1/+22
2017-02-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller