#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; } name='id' value='bed45f79a2afc9d7c279b880dfcac8f27d513b50'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/net/8021q
AgeCommit message (Expand)AuthorFilesLines
2017-02-06net: remove ndo_neigh_{construct, destroy} from stacked devicesIdo Schimmel1-2/+0