zipl/job.c: Print additional information on error paths

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 <edward6@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Eduard Shishkin
2023-06-22 19:15:10 +02:00
committed by Jan Höppner
parent 2a1a821bb3
commit ec0dcdb685

View File

@@ -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;
}
}