#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; } linux/net-next.git/'>net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalle Valo <kvalo@codeaurora.org>2017-02-08 21:28:36 +0200
committerKalle Valo <kvalo@codeaurora.org>2017-02-08 21:28:36 +0200
commitcbda794cf1bb2f4a2e75e11fda1f89457169772e (patch)
tree5b4927327da79ed0893ca537598c3e5bb4670a5d
parent514612fc4425be5149cf94422517036149b5e0b6 (diff)
parent0c8d0a4770cb6863f78a25c8d211f42e9c82251c (diff)
Merge tag 'iwlwifi-next-for-kalle-2017-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
Some patches focusing on bugfixes for v4.11: * Fix 802.11w, which was failing to due an IGTK bug; * A few more bugzilla bug fixes; * A channel-switch race condition fix; * Some fixes related to suspend/resume with new HW; * The RF-kill saga continues; * And some other fixes here and there...