summaryrefslogtreecommitdiffstats
path: root/src/printf.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-01-25 13:33:52 -0500
committerTavian Barnes <tavianator@tavianator.com>2023-01-25 13:33:52 -0500
commit18492f8142274081adeceb7a5757f86721687799 (patch)
treea16809dc1a7aa45f0ba8bcca0574e5519b5174ba /src/printf.c
parent8fbb75d6cdc4692ca1e480ab077d718489e36353 (diff)
downloadbfs-18492f8142274081adeceb7a5757f86721687799.tar.xz
mtab: Keep parent dirs open during fill_types()
Diffstat (limited to 'src/printf.c')
-rw-r--r--src/printf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/printf.c b/src/printf.c
index 5af8362..7c0c8db 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -255,6 +255,10 @@ static int bfs_printf_F(CFILE *cfile, const struct bfs_printf *directive, const
}
const char *type = bfs_fstype(directive->ptr, statbuf);
+ if (!type) {
+ return -1;
+ }
+
return dyn_fprintf(cfile->file, directive, type);
}