zipl: set kernel parmline only if it was specified

Before commit 5fb6434548 ("zipl: add get_common_components() and
finalize_common_address_data()") the default kernel parmline was only
overwritten if a parmline was specified. After the commit it was always
overwritten, even if no parmline was specified. Let's change this
behavior back by adding a NULL-pointer check. For dump types this change
changes the behavior before commit 5fb6434548 ("zipl: add
get_common_components() and finalize_common_address_data()").

Fixes: 5fb6434548 ("zipl: add get_common_components() and finalize_common_address_data()")
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2022-08-10 11:11:42 +00:00
committed by Jan Höppner
parent fc1167fd34
commit a4eb03dfe1

View File

@@ -561,11 +561,13 @@ get_common_components(struct job_common_ipl_data *common,
MAXIMUM_PHYSICAL_BLOCKSIZE);
if (rc)
goto error;
rc = set_cl_element(&cl[num++], "parmline", NULL, &common->parm_addr,
MAXIMUM_PARMLINE_SIZE, 0,
MAXIMUM_PHYSICAL_BLOCKSIZE);
if (rc)
goto error;
if (common->parmline) {
rc = set_cl_element(&cl[num++], "parmline", NULL, &common->parm_addr,
MAXIMUM_PARMLINE_SIZE, 0,
MAXIMUM_PHYSICAL_BLOCKSIZE);
if (rc)
goto error;
}
if (common->ramdisk) {
rc = set_cl_element(&cl[num++], "initial ramdisk",
common->ramdisk, &common->ramdisk_addr,