summaryrefslogtreecommitdiffstats
path: root/src/diag.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-05-17 13:13:06 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-05-17 13:57:01 -0400
commitc70e7375b1808b23fe4db2018d5e8c9bcb70464d (patch)
treeb84fca909d89c7d5a7f461c7cafeae0058bdca79 /src/diag.c
parentc3d6f07b8e4d22df533ce7a90660ae1da2df5476 (diff)
downloadbfs-c70e7375b1808b23fe4db2018d5e8c9bcb70464d.tar.xz
diag: New helpers to include xstrerror(errno) automatically
Diffstat (limited to 'src/diag.c')
-rw-r--r--src/diag.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/diag.c b/src/diag.c
index deb6f26..bb744f6 100644
--- a/src/diag.c
+++ b/src/diag.c
@@ -38,6 +38,10 @@ noreturn void bfs_abortf(const struct bfs_loc *loc, const char *format, ...) {
abort();
}
+const char *bfs_errstr(void) {
+ return xstrerror(errno);
+}
+
const char *debug_flag_name(enum debug_flags flag) {
switch (flag) {
case DEBUG_COST: