1*03066ed3SEduard Zingerman // SPDX-License-Identifier: GPL-2.0 2*03066ed3SEduard Zingerman #include <unistd.h> 3*03066ed3SEduard Zingerman 4*03066ed3SEduard Zingerman /* As a regular read(2), but allows to specify a timeout in micro-seconds. 5*03066ed3SEduard Zingerman * Returns -EAGAIN on timeout. 6*03066ed3SEduard Zingerman */ 7*03066ed3SEduard Zingerman int read_with_timeout(int fd, char *buf, size_t count, long usec); 8