From e496e9862cef93e0d0097e8eb5cb8e2fbd801bfc Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Thu, 20 Apr 2023 13:27:39 +0000 Subject: [PATCH] zipl: show whether we're installed LD ipl or dump Let the user know whether we're going to install a list-directed IPL or dump. Signed-off-by: Sven Schnelle Acked-by: Eduard Shishkin Acked-by: Stefan Haberland Signed-off-by: Steffen Eiden --- zipl/include/disk.h | 2 +- zipl/src/disk.c | 4 ++-- zipl/src/install.c | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/zipl/include/disk.h b/zipl/include/disk.h index 8264fa74..d689c766 100644 --- a/zipl/include/disk.h +++ b/zipl/include/disk.h @@ -102,7 +102,7 @@ int disk_get_info_from_file(const char* filename, struct disk_info** info); void disk_free_info(struct disk_info* info); char* disk_get_type_name(disk_type_t type); -char *disk_get_ipl_type(disk_type_t type); +char *disk_get_ipl_type(disk_type_t type, int is_dump); int disk_is_large_volume(struct disk_info* info); int disk_cyl_from_blocknum(blocknum_t blocknum, struct disk_info* info); int disk_head_from_blocknum(blocknum_t blocknum, struct disk_info* info); diff --git a/zipl/src/disk.c b/zipl/src/disk.c index db8dcad4..160c34fc 100644 --- a/zipl/src/disk.c +++ b/zipl/src/disk.c @@ -841,7 +841,7 @@ disk_get_type_name(disk_type_t type) } /* Return IPL types supported for a given disk TYPE */ -char *disk_get_ipl_type(disk_type_t type) +char *disk_get_ipl_type(disk_type_t type, int is_dump) { switch (type) { case disk_type_scsi: @@ -850,7 +850,7 @@ char *disk_get_ipl_type(disk_type_t type) case disk_type_eckd_ldl: return "CCW-"; case disk_type_eckd_cdl: - return "CCW- and LD-"; + return is_dump ? "LD-" : "CCW- and LD-"; default: return ""; } diff --git a/zipl/src/install.c b/zipl/src/install.c index 4d146278..370fa8dd 100644 --- a/zipl/src/install.c +++ b/zipl/src/install.c @@ -345,8 +345,10 @@ int install_bootloader(struct job_data *job, struct install_set *bis) int fd, rc; /* Inform user about what we're up to */ - printf("Preparing boot device for %sIPL: ", - disk_get_ipl_type(info->type)); + printf("Preparing boot device for %s%s: ", + disk_get_ipl_type(info->type, + job->id == job_dump_partition), + job->id == job_dump_partition ? "dump" : "IPL"); if (info->name) { printf("%s", info->name); if (info->devno >= 0)