From c0e8c7e245c09598478302155b37a15f3370571f Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 4 Nov 2018 15:02:11 +0100 Subject: cleanup: let rdline_init open the file Signed-off-by: David Oberhollenzer --- lib/include/libcfg.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/include') diff --git a/lib/include/libcfg.h b/lib/include/libcfg.h index 95f91a8..3e631d1 100644 --- a/lib/include/libcfg.h +++ b/lib/include/libcfg.h @@ -49,12 +49,14 @@ typedef struct { /* Initialize the config line scanner. - The scanner reads from the provided fd. The filename is used for - error reporting. An argument count and vector can be set for argument - substitution in rdline. + The scanner opens the filename relative to the passed dirfd. An + argument count and vector can be set for argument substitution + in rdline. + + Returns 0 on success. */ -void rdline_init(rdline_t *t, int fd, const char *filename, - int argc, const char *const *argv); +int rdline_init(rdline_t *t, int dirfd, const char *filename, + int argc, const char *const *argv); void rdline_cleanup(rdline_t *t); -- cgit v1.2.3