From: BALATON Zoltan Date: Thu, 15 Jul 2021 16:50:44 +0000 (+0200) Subject: ppc/pegasos2: Fix spurious warning with -bios X-Git-Tag: v6.1.0-rc2~15^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ebc0048dd8ff93c2847739599afa630f3d9dabd;p=thirdparty%2Fqemu.git ppc/pegasos2: Fix spurious warning with -bios The -append option is currently not compatible with -bios (as we don't yet emulate nvram so we can only put it in the environment with VOF). Therefore a warning is printed if -append is used with -bios but because the default value of kernel_cmdline seems to be an empty string instead of NULL this warning was printed even without -append when -bios is used. Only print warning if -append is given. Signed-off-by: BALATON Zoltan Message-Id: <483ac599a1407b766179aaea2794aed60cc09f53.1626367844.git.balaton@eik.bme.hu> Signed-off-by: David Gibson --- diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c index 9fad1854b1b..b8ce859f1a9 100644 --- a/hw/ppc/pegasos2.c +++ b/hw/ppc/pegasos2.c @@ -191,7 +191,7 @@ static void pegasos2_init(MachineState *machine) warn_report("Option -kernel may be ineffective with -bios."); } } - if (machine->kernel_cmdline && !pm->vof) { + if (!pm->vof && machine->kernel_cmdline && machine->kernel_cmdline[0]) { warn_report("Option -append may be ineffective with -bios."); } }