summaryrefslogtreecommitdiffstats
path: root/src/eval.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/eval.c
parent8fbb75d6cdc4692ca1e480ab077d718489e36353 (diff)
downloadbfs-18492f8142274081adeceb7a5757f86721687799.tar.xz
mtab: Keep parent dirs open during fill_types()
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 32b2e0e..d297af1 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -509,6 +509,11 @@ bool eval_fstype(const struct bfs_expr *expr, struct bfs_eval *state) {
}
const char *type = bfs_fstype(mtab, statbuf);
+ if (!type) {
+ eval_report_error(state);
+ return false;
+ }
+
return strcmp(type, expr->argv[1]) == 0;
}