make raw functions static. formatting tweaks

This commit is contained in:
Bill Gesner
2020-11-20 17:01:04 +00:00
parent d46cefc71c
commit a15a060d90
2 changed files with 90 additions and 90 deletions

33
lfs.c
View File

@@ -10,6 +10,37 @@
#define LFS_BLOCK_NULL ((lfs_block_t)-1)
#define LFS_BLOCK_INLINE ((lfs_block_t)-2)
static int lfs_format_raw(lfs_t *lfs, const struct lfs_config *config);
static int lfs_mount_raw(lfs_t *lfs, const struct lfs_config *config);
static int lfs_unmount_raw(lfs_t *lfs);
static int lfs_remove_raw(lfs_t *lfs, const char *path);
static int lfs_rename_raw(lfs_t *lfs, const char *oldpath, const char *newpath);
static int lfs_stat_raw(lfs_t *lfs, const char *path, struct lfs_info *info);
static lfs_ssize_t lfs_getattr_raw(lfs_t *lfs, const char *path, uint8_t type, void *buffer, lfs_size_t size);
static int lfs_setattr_raw(lfs_t *lfs, const char *path, uint8_t type, const void *buffer, lfs_size_t size);
static int lfs_removeattr_raw(lfs_t *lfs, const char *path, uint8_t type);
static int lfs_file_open_raw(lfs_t *lfs, lfs_file_t *file, const char *path, int flags);
static int lfs_file_opencfg_raw(lfs_t *lfs, lfs_file_t *file, const char *path, int flags, const struct lfs_file_config *config);
static int lfs_file_close_raw(lfs_t *lfs, lfs_file_t *file);
static int lfs_file_sync_raw(lfs_t *lfs, lfs_file_t *file);
static lfs_ssize_t lfs_file_read_raw(lfs_t *lfs, lfs_file_t *file, void *buffer, lfs_size_t size);
static lfs_ssize_t lfs_file_write_raw(lfs_t *lfs, lfs_file_t *file, const void *buffer, lfs_size_t size);
static lfs_soff_t lfs_file_seek_raw(lfs_t *lfs, lfs_file_t *file, lfs_soff_t off, int whence);
static int lfs_file_truncate_raw(lfs_t *lfs, lfs_file_t *file, lfs_off_t size);
static lfs_soff_t lfs_file_tell_raw(lfs_t *lfs, lfs_file_t *file);
static int lfs_file_rewind_raw(lfs_t *lfs, lfs_file_t *file);
static lfs_soff_t lfs_file_size_raw(lfs_t *lfs, lfs_file_t *file);
static int lfs_mkdir_raw(lfs_t *lfs, const char *path);
static int lfs_dir_open_raw(lfs_t *lfs, lfs_dir_t *dir, const char *path);
static int lfs_dir_close_raw(lfs_t *lfs, lfs_dir_t *dir);
static int lfs_dir_read_raw(lfs_t *lfs, lfs_dir_t *dir, struct lfs_info *info);
static int lfs_dir_seek_raw(lfs_t *lfs, lfs_dir_t *dir, lfs_off_t off);
static lfs_soff_t lfs_dir_tell_raw(lfs_t *lfs, lfs_dir_t *dir);
static int lfs_dir_rewind_raw(lfs_t *lfs, lfs_dir_t *dir);
static lfs_ssize_t lfs_fs_size_raw(lfs_t *lfs);
static int lfs_fs_traverse_raw(lfs_t *lfs, int (*cb)(void*, lfs_block_t), void *data);
static int lfs_migrate_raw(lfs_t *lfs, const struct lfs_config *cfg);
/// Caching block device operations ///
static inline void lfs_cache_drop(lfs_t *lfs, lfs_cache_t *rcache) {
// do not zero, cheaper if cache is readonly or only going to be
@@ -5345,7 +5376,7 @@ int lfs_file_open (lfs_t * lfs, lfs_file_t * file, const char * path, int flags)
return lfs_file_open_raw(lfs, file, path, flags);
}
int lfs_file_opencfg_ts(lfs_t *lfs, lfs_file_t *file, const char *path, int flags, const struct lfs_file_config *config) {
int lfs_file_opencfg(lfs_t *lfs, lfs_file_t *file, const char *path, int flags, const struct lfs_file_config *config) {
return lfs_file_opencfg_raw(lfs, file, path, flags, config);
}

31
lfs.h
View File

@@ -657,37 +657,6 @@ int lfs_fs_traverse(lfs_t *lfs, int (*cb)(void*, lfs_block_t), void *data);
int lfs_migrate(lfs_t *lfs, const struct lfs_config *cfg);
#endif
int lfs_format_raw(lfs_t *lfs, const struct lfs_config *config);
int lfs_mount_raw(lfs_t *lfs, const struct lfs_config *config);
int lfs_unmount_raw(lfs_t *lfs);
int lfs_remove_raw(lfs_t *lfs, const char *path);
int lfs_rename_raw(lfs_t *lfs, const char *oldpath, const char *newpath);
int lfs_stat_raw(lfs_t *lfs, const char *path, struct lfs_info *info);
lfs_ssize_t lfs_getattr_raw(lfs_t *lfs, const char *path, uint8_t type, void *buffer, lfs_size_t size);
int lfs_setattr_raw(lfs_t *lfs, const char *path, uint8_t type, const void *buffer, lfs_size_t size);
int lfs_removeattr_raw(lfs_t *lfs, const char *path, uint8_t type);
int lfs_file_open_raw(lfs_t *lfs, lfs_file_t *file, const char *path, int flags);
int lfs_file_opencfg_raw(lfs_t *lfs, lfs_file_t *file, const char *path, int flags, const struct lfs_file_config *config);
int lfs_file_close_raw(lfs_t *lfs, lfs_file_t *file);
int lfs_file_sync_raw(lfs_t *lfs, lfs_file_t *file);
lfs_ssize_t lfs_file_read_raw(lfs_t *lfs, lfs_file_t *file, void *buffer, lfs_size_t size);
lfs_ssize_t lfs_file_write_raw(lfs_t *lfs, lfs_file_t *file, const void *buffer, lfs_size_t size);
lfs_soff_t lfs_file_seek_raw(lfs_t *lfs, lfs_file_t *file, lfs_soff_t off, int whence);
int lfs_file_truncate_raw(lfs_t *lfs, lfs_file_t *file, lfs_off_t size);
lfs_soff_t lfs_file_tell_raw(lfs_t *lfs, lfs_file_t *file);
int lfs_file_rewind_raw(lfs_t *lfs, lfs_file_t *file);
lfs_soff_t lfs_file_size_raw(lfs_t *lfs, lfs_file_t *file);
int lfs_mkdir_raw(lfs_t *lfs, const char *path);
int lfs_dir_open_raw(lfs_t *lfs, lfs_dir_t *dir, const char *path);
int lfs_dir_close_raw(lfs_t *lfs, lfs_dir_t *dir);
int lfs_dir_read_raw(lfs_t *lfs, lfs_dir_t *dir, struct lfs_info *info);
int lfs_dir_seek_raw(lfs_t *lfs, lfs_dir_t *dir, lfs_off_t off);
lfs_soff_t lfs_dir_tell_raw(lfs_t *lfs, lfs_dir_t *dir);
int lfs_dir_rewind_raw(lfs_t *lfs, lfs_dir_t *dir);
lfs_ssize_t lfs_fs_size_raw(lfs_t *lfs);
int lfs_fs_traverse_raw(lfs_t *lfs, int (*cb)(void*, lfs_block_t), void *data);
int lfs_migrate_raw(lfs_t *lfs, const struct lfs_config *cfg);
#ifdef __cplusplus
} /* extern "C" */
#endif