mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl/boot: Always clear COMMAND_LINE_EXTRA region
Always clear the COMMAND_LINE_EXTRA region, also in case sclp_setup() fails. If the region is not cleared properly, there might be junk in there after a reboot, causing confusion for the kernel later. While we're at it, also switch to COMMAND_LINE_EXTRA_SIZE instead of COMMAND_LINE_SIZE, since that constant is more appropriate here. Closes: https://github.com/ibm-s390-linux/s390-tools/pull/122 Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
@@ -143,12 +143,13 @@ int menu(void)
|
||||
int rc;
|
||||
|
||||
cmd_line_extra = (char *)COMMAND_LINE_EXTRA;
|
||||
memset(cmd_line_extra, 0, COMMAND_LINE_EXTRA_SIZE);
|
||||
|
||||
rc = sclp_setup(SCLP_INIT);
|
||||
if (rc)
|
||||
/* sclp setup failed boot default */
|
||||
goto boot;
|
||||
|
||||
memset(cmd_line_extra, 0, COMMAND_LINE_SIZE);
|
||||
rc = menu_param(&value);
|
||||
if (rc == 0) {
|
||||
/* got number from loadparm, boot it */
|
||||
|
||||
Reference in New Issue
Block a user