diff options
Diffstat (limited to 'src/libstrongswan/utils/chunk.h')
-rw-r--r-- | src/libstrongswan/utils/chunk.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstrongswan/utils/chunk.h b/src/libstrongswan/utils/chunk.h index 92a96ffba..1228da30e 100644 --- a/src/libstrongswan/utils/chunk.h +++ b/src/libstrongswan/utils/chunk.h @@ -102,10 +102,13 @@ bool chunk_write(chunk_t chunk, char *path, char *label, mode_t mask, bool force /** * Store data read from FD into a chunk * + * On error, errno is set appropriately. + * * @param fd file descriptor to read from - * @return chunk or chunk_empty on failure + * @param chunk chunk receiving allocated buffer + * @return TRUE if successful, FALSE on failure */ -chunk_t chunk_from_fd(int fd); +bool chunk_from_fd(int fd, chunk_t *chunk); /** * mmap() a file to a chunk |