]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: Show an error for conflicting graphics options
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Aug 2020 07:57:50 +0000 (08:57 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Aug 2020 13:33:50 +0000 (14:33 +0100)
The autobuilder managed to pass the nographic option with "sdl gl" due
to a problem elsewhere. It would have been useful for runqemu to have
errored rather than passing conflicting options to qemu. Add an
error for this invalid usecase.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index 7fb5f7db57b34c455e9657338d45c127f68b775e..c71f3c4df578877765da314c788e794a6d3b5a80 100755 (executable)
@@ -456,6 +456,10 @@ class BaseConfig(object):
             if arg in self.fstypes + self.vmtypes + self.wictypes:
                 self.check_arg_fstype(arg)
             elif arg == 'nographic':
+                if ('sdl' in sys.argv):
+                    raise RunQemuError('Option nographic makes no sense alongside the sdl option.' % (arg))
+                if ('gtk' in sys.argv):
+                    raise RunQemuError('Option nographic makes no sense alongside the gtk option.' % (arg))
                 self.qemu_opt_script += ' -nographic'
                 self.kernel_cmdline_script += ' console=ttyS0'
             elif arg == 'sdl':