From: root Date: Thu, 24 Sep 2015 12:03:57 +0000 (+0000) Subject: remove file_expect argument from those ext4_fopen2 calls. X-Git-Tag: v1.0.0~432^2~3 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=4dc0ded0b3acf88dda8e7d5ef243c44231d6eb22;p=lwext4.git remove file_expect argument from those ext4_fopen2 calls. --- diff --git a/lwext4/ext4.c b/lwext4/ext4.c index ae9c99d..abc8c8e 100644 --- a/lwext4/ext4.c +++ b/lwext4/ext4.c @@ -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); diff --git a/lwext4/ext4.h b/lwext4/ext4.h index 65f2774..192ecc9 100644 --- a/lwext4/ext4.h +++ b/lwext4/ext4.h @@ -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