mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl/boot: move SCSI MBR struct definition to boot_defs.h for reuse
To reduce duplication of definitions and facilitate reuse between zipl and zgetdump. Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com> Reviewed-by: Mikhail Zaslonko <zaslonko@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
8f37000137
commit
953af2cc67
@@ -168,4 +168,15 @@ struct boot_info {
|
||||
} bp;
|
||||
} __packed;
|
||||
|
||||
#define DISK_LAYOUT_ID 0x00000001
|
||||
|
||||
struct scsi_mbr {
|
||||
uint8_t magic[4];
|
||||
uint32_t version_id;
|
||||
uint8_t reserved[8];
|
||||
struct linear_blockptr program_table_pointer;
|
||||
uint8_t reserved2[0x50];
|
||||
struct boot_info boot_info;
|
||||
} __packed;
|
||||
|
||||
#endif /* BOOT_DEFS_H */
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#define ZIPL_MAGIC "zIPL"
|
||||
#define ZIPL_MAGIC_SIZE 4
|
||||
#define DISK_LAYOUT_ID 0x00000001
|
||||
|
||||
#define ADDRESS_LIMIT 0x80000000UL
|
||||
#define UNSPECIFIED_ADDRESS -1UL
|
||||
|
||||
@@ -70,9 +70,6 @@ get_scsi_layout(unsigned char* bootblock)
|
||||
return scsi_layout_unknown;
|
||||
}
|
||||
|
||||
|
||||
#define DISK_LAYOUT_ID 0x00000001
|
||||
|
||||
static int
|
||||
overwrite_partition_start(int fd, struct disk_info* info, int mv_dump_magic);
|
||||
|
||||
@@ -83,14 +80,7 @@ static int
|
||||
update_scsi_mbr(void* bootblock, disk_blockptr_t* table,
|
||||
struct disk_info* info, disk_blockptr_t* scsi_dump_sb_blockptr)
|
||||
{
|
||||
struct scsi_mbr {
|
||||
uint8_t magic[4];
|
||||
uint32_t version_id;
|
||||
uint8_t reserved[8];
|
||||
uint8_t program_table_pointer[16];
|
||||
uint8_t reserved2[0x50];
|
||||
struct boot_info boot_info;
|
||||
} __packed* mbr;
|
||||
struct scsi_mbr *mbr;
|
||||
struct scsi_dump_param param;
|
||||
void* buffer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user