s390/boot: access kernel command line via parmarea
Access the kernel command line via parmarea instead of using the COMMAND_LINE define. With this the following gcc11 warning is removed: arch/s390/boot/ipl_parm.c: In function ‘setup_boot_command_line’: arch/s390/boot/ipl_parm.c:168:50: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
parent
f73c632d38
commit
27c1dac0b6
|
@ -165,12 +165,12 @@ static inline int has_ebcdic_char(const char *str)
|
|||
|
||||
void setup_boot_command_line(void)
|
||||
{
|
||||
COMMAND_LINE[ARCH_COMMAND_LINE_SIZE - 1] = 0;
|
||||
parmarea.command_line[ARCH_COMMAND_LINE_SIZE - 1] = 0;
|
||||
/* convert arch command line to ascii if necessary */
|
||||
if (has_ebcdic_char(COMMAND_LINE))
|
||||
EBCASC(COMMAND_LINE, ARCH_COMMAND_LINE_SIZE);
|
||||
if (has_ebcdic_char(parmarea.command_line))
|
||||
EBCASC(parmarea.command_line, ARCH_COMMAND_LINE_SIZE);
|
||||
/* copy arch command line */
|
||||
strcpy(early_command_line, strim(COMMAND_LINE));
|
||||
strcpy(early_command_line, strim(parmarea.command_line));
|
||||
|
||||
/* append IPL PARM data to the boot command line */
|
||||
if (!is_prot_virt_guest() && ipl_block_valid)
|
||||
|
|
Loading…
Reference in New Issue