diff options
Diffstat (limited to 'libmount/src')
-rw-r--r-- | libmount/src/tab_parse.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c index 151130325..8e94715d2 100644 --- a/libmount/src/tab_parse.c +++ b/libmount/src/tab_parse.c @@ -1086,9 +1086,10 @@ int mnt_table_parse_fstab(struct libmnt_table *tb, const char *filename) return -EINVAL; if (!filename) filename = mnt_get_fstab_path(); - - if (!filename || stat(filename, &st)) + if (!filename) return -EINVAL; + if (stat(filename, &st) != 0) + return -errno; tb->fmt = MNT_FMT_FSTAB; |