shithub: lwext4

Download patch

ref: 4dc0ded0b3acf88dda8e7d5ef243c44231d6eb22
parent: 57ab5f230b0a085bc236cf353013d02854e42aa5
author: root <[email protected]>
date: Thu Sep 24 08:03:57 EDT 2015

remove file_expect argument from those ext4_fopen2 calls.

--- a/lwext4/ext4.c
+++ b/lwext4/ext4.c
@@ -1145,7 +1145,7 @@
 	return r;
 }
 
-int ext4_fopen2(ext4_file *f, const char *path, int flags, bool file_expect)
+int ext4_fopen2(ext4_file *f, const char *path, int flags)
 {
 	struct ext4_mountpoint *mp = ext4_get_mount(path);
 	int r;
@@ -1154,10 +1154,7 @@
 	if (!mp)
 		return ENOENT;
 
-	if (file_expect == true)
-		filetype = EXT4_DIRECTORY_FILETYPE_REG_FILE;
-	else
-		filetype = EXT4_DIRECTORY_FILETYPE_DIR;
+        filetype = EXT4_DIRECTORY_FILETYPE_REG_FILE;
 
 	EXT4_MP_LOCK(mp);
 	ext4_block_cache_write_back(mp->fs.bdev, 1);
--- a/lwext4/ext4.h
+++ b/lwext4/ext4.h
@@ -297,7 +297,7 @@
  *          /my_partition/my_file
  * @param   flags open file flags
  * @return  standard error code*/
-int ext4_fopen2(ext4_file *f, const char *path, int flags, bool file_expect);
+int ext4_fopen2(ext4_file *f, const char *path, int flags);
 
 /**@brief   File close function.
  * @param   f file handle