diff options
author | Cyril Bur <cyril.bur@au1.ibm.com> | 2017-03-17 16:13:06 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-03-24 12:42:37 +1100 |
commit | e29613b050ad9b35f9305cc23f4cadcce4606f39 (patch) | |
tree | de7695b74051f942e4456f34f357c506eb460d8d /libflash/libffs.h | |
parent | 602dee4505cd0ceb5b69f056ec403f982b585791 (diff) | |
download | skiboot-e29613b050ad9b35f9305cc23f4cadcce4606f39.zip skiboot-e29613b050ad9b35f9305cc23f4cadcce4606f39.tar.gz skiboot-e29613b050ad9b35f9305cc23f4cadcce4606f39.tar.bz2 |
libffs: Understand how to create FFS partition TOCs and entries.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libflash/libffs.h')
-rw-r--r-- | libflash/libffs.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libflash/libffs.h b/libflash/libffs.h index 0976961..2c1fbd8 100644 --- a/libflash/libffs.h +++ b/libflash/libffs.h @@ -21,7 +21,9 @@ /* FFS handle, opaque */ struct ffs_handle; +struct ffs_hdr; struct ffs_entry; +struct ffs_entry_user; /** * struct ffs_entry_user - User data entries @@ -127,4 +129,20 @@ int ffs_part_info(struct ffs_handle *ffs, uint32_t part_idx, int ffs_update_act_size(struct ffs_handle *ffs, uint32_t part_idx, uint32_t act_size); +int ffs_hdr_new(uint32_t size, uint32_t block_size, uint32_t block_count, + struct ffs_hdr **r); + +int ffs_hdr_add_side(struct ffs_hdr *hdr); + +int ffs_entry_new(const char *name, uint32_t base, uint32_t size, struct ffs_entry **r); + +int ffs_entry_user_set(struct ffs_entry *ent, struct ffs_entry_user *user); + +int ffs_entry_add(struct ffs_hdr *hdr, struct ffs_entry *entry, unsigned int side); + +int ffs_hdr_create_backup(struct ffs_hdr *hdr); + +int ffs_hdr_finalise(struct blocklevel_device *bl, struct ffs_hdr *hdr); + +int ffs_hdr_free(struct ffs_hdr *hdr); #endif /* __LIBFFS_H */ |