From 18492f8142274081adeceb7a5757f86721687799 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 25 Jan 2023 13:33:52 -0500 Subject: mtab: Keep parent dirs open during fill_types() --- src/printf.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/printf.c') 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); } -- cgit v1.2.3