aboutsummaryrefslogtreecommitdiff
path: root/lib/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-11-04 15:02:11 +0100
committerDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-11-04 15:02:11 +0100
commitc0e8c7e245c09598478302155b37a15f3370571f (patch)
treec2e4d7d62f00c8de12d08d9d469b8c31b3f1e21d /lib/include
parent074fe20a4761e284af2aa46f978f48410cfa60c5 (diff)
cleanup: let rdline_init open the file
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'lib/include')
-rw-r--r--lib/include/libcfg.h12
1 files changed, 7 insertions, 5 deletions
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);