Fixed standard name mismatch LFS_ERR_EXISTS -> LFS_ERR_EXIST

Matches the standard EEXIST name found on most systems. Other than
this name, all other common constant names were consistent in this
manner.
This commit is contained in:
Christopher Haster
2017-11-16 17:50:14 -06:00
parent 843e3c6c75
commit f9f4f5ccec
3 changed files with 4 additions and 4 deletions

4
lfs.c
View File

@@ -819,7 +819,7 @@ int lfs_mkdir(lfs_t *lfs, const char *path) {
lfs_entry_t entry;
err = lfs_dir_find(lfs, &cwd, &entry, &path);
if (err != LFS_ERR_NOENT || strchr(path, '/') != NULL) {
return err ? err : LFS_ERR_EXISTS;
return err ? err : LFS_ERR_EXIST;
}
// build up new directory
@@ -1219,7 +1219,7 @@ int lfs_file_open(lfs_t *lfs, lfs_file_t *file,
} else if (entry.d.type == LFS_TYPE_DIR) {
return LFS_ERR_ISDIR;
} else if (flags & LFS_O_EXCL) {
return LFS_ERR_EXISTS;
return LFS_ERR_EXIST;
}
// setup file struct