#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; } me='id' value='0d909aa7c276584cc17413a7bec64d4fb5da2968'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
inux/net-next.git/log/tools/thermal/tmon/Makefile?h=nds-private-remove&id=303223092081963513494b4377fa1ac9e362ed4b'>Makefile
AgeCommit message (Expand)AuthorFilesLines
AgeCommit message (Expand)AuthorFilesLines