From ec0dcdb685df0243c1579ed9d47e9616ea96f895 Mon Sep 17 00:00:00 2001 From: Eduard Shishkin Date: Thu, 22 Jun 2023 19:15:10 +0200 Subject: [PATCH] zipl/job.c: Print additional information on error paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Print the name of the section which specifes non-existing image and/or ramdisk files. It allows to quickly identify problems after using non-atomic tools manipulating with bootloader settings. Signed-off-by: Eduard Shishkin Reviewed-by: Peter Oberparleiter Signed-off-by: Jan Höppner --- zipl/src/job.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zipl/src/job.c b/zipl/src/job.c index 2ec377b2..f0af943f 100644 --- a/zipl/src/job.c +++ b/zipl/src/job.c @@ -788,6 +788,8 @@ check_common_ipl_data(struct job_common_ipl_data *common, const char *section, rc = 0; goto skip_image; } + fprintf(stderr, "Section '%s': Could not read image file '%s'\n", + section, common->image); return rc; } if (size < MAX_COMMAND_LINE_SIZE + sizeof(uint64_t)) { @@ -822,6 +824,8 @@ skip_image: common->ignore = true; rc = 0; } else { + fprintf(stderr, "Section '%s': Missing ramdisk file '%s'\n", + section, common->ramdisk); return rc; } }