mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl/src: Add ->set_location() private method of program component
Add/use ->set_location() private method of struct component_footer instead of checking component types every time when operating with program components. Reviewed-by: Stefan Haberland <sth@linux.ibm.com> Signed-off-by: Eduard Shishkin <edward6@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
4f622325ef
commit
ee8897f9db
@@ -58,6 +58,9 @@ struct component_footer {
|
||||
* in the bootmap file. Otherwise, to
|
||||
* phy_block_size boundary.
|
||||
*/
|
||||
void (*set_location)(struct component_loc *location,
|
||||
address_t load_address, blocknum_t count,
|
||||
int block_size);
|
||||
};
|
||||
|
||||
struct program_component {
|
||||
@@ -109,6 +112,12 @@ static inline enum scsi_layout get_scsi_layout(unsigned char *bootblock)
|
||||
return scsi_layout_unknown;
|
||||
}
|
||||
|
||||
static inline struct component_footer *
|
||||
component_footer_by_id(enum program_component_id id)
|
||||
{
|
||||
return &component_footers[id];
|
||||
}
|
||||
|
||||
static inline component_type component_type_by_id(enum program_component_id id)
|
||||
{
|
||||
return component_footers[id].type;
|
||||
|
||||
Reference in New Issue
Block a user