remove file_expect argument from those ext4_fopen2 calls.
authorroot <ngkaho1234@gmail.com>
Thu, 24 Sep 2015 12:03:57 +0000 (12:03 +0000)
committerroot <ngkaho1234@gmail.com>
Thu, 24 Sep 2015 16:20:55 +0000 (16:20 +0000)
lwext4/ext4.c
lwext4/ext4.h

index ae9c99d439ff80cf468e9253f96047a5580bf186..abc8c8ec19f2a2ddd2f096570921a9989a8b56f1 100644 (file)
@@ -1145,7 +1145,7 @@ int ext4_fopen(ext4_file *f, const char *path, const char *flags)
        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 @@ int ext4_fopen2(ext4_file *f, const char *path, int flags, bool file_expect)
        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);
index 65f2774077a6b6ae1440ff143ec9a072794a55ed..192ecc95e49ac65bed20d531e8cec0cec03a1345 100644 (file)
@@ -297,7 +297,7 @@ int ext4_fopen(ext4_file *f, const char *path, const char *flags);
  *          /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