apache-mynewt-bot commented on issue #2214: fs: Add file flush functionality URL: https://github.com/apache/mynewt-core/pull/2214#issuecomment-591701626 <!-- style-bot --> ## Style check summary ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md) #### fs/fatfs/src/mynewt_glue.c <details> ```diff @@ -33,10 +33,10 @@ #include <fs/fs_if.h> static int fatfs_open(const char *path, uint8_t access_flags, - struct fs_file **out_file); + struct fs_file **out_file); static int fatfs_close(struct fs_file *fs_file); static int fatfs_read(struct fs_file *fs_file, uint32_t len, void *out_data, - uint32_t *out_len); + uint32_t *out_len); static int fatfs_write(struct fs_file *fs_file, const void *data, int len); static int fatfs_flush(struct fs_file *fs_file); static int fatfs_seek(struct fs_file *fs_file, uint32_t offset); ``` </details> #### fs/fs/include/fs/fs.h <details> ```diff @@ -50,7 +50,7 @@ int fs_readdir(struct fs_dir *, struct fs_dirent **); int fs_closedir(struct fs_dir *); int fs_dirent_name(const struct fs_dirent *, size_t max_len, - char *out_name, uint8_t *out_name_len); + char *out_name, uint8_t *out_name_len); int fs_dirent_is_dir(const struct fs_dirent *); int fs_flush(struct fs_file *); ``` </details> #### fs/fs/include/fs/fs_if.h <details> ```diff @@ -31,10 +31,10 @@ */ struct fs_ops { int (*f_open)(const char *filename, uint8_t access_flags, - struct fs_file **out_file); + struct fs_file **out_file); int (*f_close)(struct fs_file *file); int (*f_read)(struct fs_file *file, uint32_t len, void *out_data, - uint32_t *out_len); + uint32_t *out_len); int (*f_write)(struct fs_file *file, const void *data, int len); int (*f_flush)(struct fs_file *file); ``` </details> #### fs/fs/src/fs_file.c <details> ```diff @@ -124,23 +125,23 @@ } struct fs_ops not_initialized_ops = { - .f_open = &fake_open, - .f_close = &fake_close, - .f_read = &fake_read, - .f_write = &fake_write, - .f_flush = &fake_flush, - .f_seek = &fake_seek, - .f_getpos = &fake_getpos, - .f_filelen = &fake_filelen, - .f_unlink = &fake_unlink, - .f_rename = &fake_rename, - .f_mkdir = &fake_mkdir, - .f_opendir = &fake_opendir, - .f_readdir = &fake_readdir, - .f_closedir = &fake_closedir, - .f_dirent_name = &fake_dirent_name, + .f_open = &fake_open, + .f_close = &fake_close, + .f_read = &fake_read, + .f_write = &fake_write, + .f_flush = &fake_flush, + .f_seek = &fake_seek, + .f_getpos = &fake_getpos, + .f_filelen = &fake_filelen, + .f_unlink = &fake_unlink, + .f_rename = &fake_rename, + .f_mkdir = &fake_mkdir, + .f_opendir = &fake_opendir, + .f_readdir = &fake_readdir, + .f_closedir = &fake_closedir, + .f_dirent_name = &fake_dirent_name, .f_dirent_is_dir = &fake_dirent_is_dir, - .f_name = "fakefs", + .f_name = "fakefs", }; struct fs_ops * ``` </details> #### fs/nffs/src/nffs.c <details> ```diff @@ -58,10 +58,10 @@ static struct os_mutex nffs_mutex; static int nffs_open(const char *path, uint8_t access_flags, - struct fs_file **out_file); + struct fs_file **out_file); static int nffs_close(struct fs_file *fs_file); static int nffs_read(struct fs_file *fs_file, uint32_t len, void *out_data, - uint32_t *out_len); + uint32_t *out_len); static int nffs_write(struct fs_file *fs_file, const void *data, int len); static int nffs_flush(struct fs_file *fs_file); static int nffs_seek(struct fs_file *fs_file, uint32_t offset); ``` </details>
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
