#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; } hod='get'> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2016-03-27 16:09:08 +0900
committerTakashi Iwai <tiwai@suse.de>2016-03-28 09:39:41 +0200
commit0655ac2f4089321766bb9af19586900ad6cef7bc (patch)
treeaa5df2595216f7d0b995574a2aa73e4c748bca25 /sound
parent329fec2f7f7ead9dcab0a08684c700a5c55f3884 (diff)
ALSA: fireworks: move model quirk detection code to information parser
Currently, model-specific quirks are detected out of information parser, however it's natural to detect it in the parser. This commit applies the idea. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')