summaryrefslogtreecommitdiffstats
path: root/util.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2021-06-13 15:51:43 -0400
committerTavian Barnes <tavianator@tavianator.com>2021-06-13 15:51:43 -0400
commit78e968dd789ca8d1cac8da3715352184bca2a188 (patch)
treeeca2d39ab8e7728891b18cc490692034c236a2a7 /util.h
parent7b5d98877622f2bea24c9dd745dfcf312df31a87 (diff)
downloadbfs-78e968dd789ca8d1cac8da3715352184bca2a188.tar.xz
util: New xconfstr() wrapper
Diffstat (limited to 'util.h')
-rw-r--r--util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/util.h b/util.h
index 4542a46..1a34fba 100644
--- a/util.h
+++ b/util.h
@@ -264,4 +264,14 @@ size_t xread(int fd, void *buf, size_t nbytes);
*/
size_t xwrite(int fd, const void *buf, size_t nbytes);
+/**
+ * Wrapper for confstr() that allocates with malloc().
+ *
+ * @param name
+ * The ID of the confstr to look up.
+ * @return
+ * The value of the confstr, or NULL on failure.
+ */
+char *xconfstr(int name);
+
#endif // BFS_UTIL_H