Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'emubd/lfs_emubd.c')
-rw-r--r--emubd/lfs_emubd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/emubd/lfs_emubd.c b/emubd/lfs_emubd.c
index b87d6de..fb518a8 100644
--- a/emubd/lfs_emubd.c
+++ b/emubd/lfs_emubd.c
@@ -196,7 +196,7 @@ int lfs_emubd_erase(const struct lfs_config *cfg, lfs_block_t block) {
}
}
- if (errno == ENOENT || (S_ISREG(st.st_mode) && (S_IWUSR & st.st_mode))) {
+ if (err || (S_ISREG(st.st_mode) && (S_IWUSR & st.st_mode))) {
FILE *f = fopen(emu->path, "w");
if (!f) {
return -errno;