diff options
author | Cyril Bur <cyril.bur@au1.ibm.com> | 2018-03-15 16:58:22 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-04-09 03:45:23 -0500 |
commit | 3d47dbb4fb8dc010c1905a878794731e812a05ac (patch) | |
tree | cfed3ef5d9616823c5e2997a4beca72f65d0b778 /libflash/ffs.h | |
parent | 0744faa83a1b2f5b3142414a88da84317e033c94 (diff) | |
download | skiboot-3d47dbb4fb8dc010c1905a878794731e812a05ac.zip skiboot-3d47dbb4fb8dc010c1905a878794731e812a05ac.tar.gz skiboot-3d47dbb4fb8dc010c1905a878794731e812a05ac.tar.bz2 |
libflash/libffs: Switch to storing header entries in an array
Since the libffs no longer needs to sort the entries as they get added
it makes little sense to have the complexity of a linked list when an
array will suffice.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'libflash/ffs.h')
-rw-r--r-- | libflash/ffs.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libflash/ffs.h b/libflash/ffs.h index dbbaa09..98b2598 100644 --- a/libflash/ffs.h +++ b/libflash/ffs.h @@ -161,7 +161,6 @@ struct ffs_entry { enum ffs_type type; uint32_t flags; struct ffs_entry_user user; - struct list_node list; }; @@ -206,7 +205,8 @@ struct __ffs_hdr { * @size: Size of partition table (in bytes) * @block_size: Size of block on device (in bytes) * @block_count: Number of blocks on device. - * @entries: List of partition entries + * @count: Count of the number of entires + * @entries: Array of partition entries. */ struct ffs_hdr { uint32_t version; @@ -214,8 +214,10 @@ struct ffs_hdr { uint32_t size; uint32_t block_size; uint32_t block_count; + uint32_t count; struct ffs_entry *part; - struct list_head entries; + struct ffs_entry **entries; + unsigned int entries_size; }; #endif /* __FFS_H__ */ |