From db9187c8d21e9f08b20899e3e14c1938db7b79fb Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 25 Jul 2019 14:07:16 +0200 Subject: libutil: add read_data style wrapper around pread() Signed-off-by: David Oberhollenzer --- include/util.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/util.h') diff --git a/include/util.h b/include/util.h index 8b79c30..0c36160 100644 --- a/include/util.h +++ b/include/util.h @@ -39,6 +39,12 @@ int write_data(const char *errstr, int fd, const void *data, size_t size); */ int read_data(const char *errstr, int fd, void *buffer, size_t size); +/* + Similar to read_data but wrapps pread() instead of read(). +*/ +int read_data_at(const char *errstr, off_t location, + int fd, void *buffer, size_t size); + /* A common implementation of the '--version' command line flag. -- cgit v1.2.3