X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fext4fs.h;h=34585d407d06d9aa861ace1144af627163b77554;hb=a1f5f4ac20c0947afda93f9b906facfbee2708fe;hp=24210113411a73f3b727277f59d491b952b55057;hpb=2e7365518acdb8fb6e9be332c8a6c57b457188d9;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/ext4fs.h b/include/ext4fs.h index 2421011..34585d4 100644 --- a/include/ext4fs.h +++ b/include/ext4fs.h @@ -117,6 +117,12 @@ struct ext_filesystem { struct blk_desc *dev_desc; }; +struct ext_block_cache { + char *buf; + lbaint_t block; + int size; +}; + extern struct ext2_data *ext4fs_root; extern struct ext2fs_node *ext4fs_file; @@ -128,10 +134,11 @@ extern int gindex; int ext4fs_init(void); void ext4fs_deinit(void); int ext4fs_filename_unlink(char *filename); -int ext4fs_write(const char *fname, unsigned char *buffer, - unsigned long sizebytes); +int ext4fs_write(const char *fname, const char *buffer, + unsigned long sizebytes, int type); int ext4_write_file(const char *filename, void *buf, loff_t offset, loff_t len, loff_t *actwrite); +int ext4fs_create_link(const char *target, const char *fname); #endif struct ext_filesystem *get_fs(void); @@ -146,11 +153,15 @@ int ext4fs_size(const char *filename, loff_t *size); void ext4fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot); int ext4fs_devread(lbaint_t sector, int byte_offset, int byte_len, char *buf); void ext4fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info); -long int read_allocated_block(struct ext2_inode *inode, int fileblock); +long int read_allocated_block(struct ext2_inode *inode, int fileblock, + struct ext_block_cache *cache); int ext4fs_probe(struct blk_desc *fs_dev_desc, disk_partition_t *fs_partition); int ext4_read_file(const char *filename, void *buf, loff_t offset, loff_t len, loff_t *actread); int ext4_read_superblock(char *buffer); int ext4fs_uuid(char *uuid_str); +void ext_cache_init(struct ext_block_cache *cache); +void ext_cache_fini(struct ext_block_cache *cache); +int ext_cache_read(struct ext_block_cache *cache, lbaint_t block, int size); #endif