From b56e5cf281e807ca134c75d070ca0e342dcd78cb Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Mon, 9 Jul 2018 22:50:20 +0200 Subject: [PATCH] pmb qemu: Properly escape kernel commandline --- pmb/qemu/run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pmb/qemu/run.py b/pmb/qemu/run.py index 2a41469f..878c26fa 100644 --- a/pmb/qemu/run.py +++ b/pmb/qemu/run.py @@ -20,6 +20,7 @@ import logging import os import re import signal +import shlex import shutil import pmb.build @@ -137,7 +138,7 @@ def command_qemu(args, arch, device, img_path, spice_enabled): command += ["-kernel", rootfs + "/boot/vmlinuz-" + flavor] command += ["-initrd", rootfs + "/boot/initramfs-" + flavor] - command += ["-append", '"' + cmdline + '"'] + command += ["-append", shlex.quote(cmdline)] command += ["-m", str(args.memory)] command += ["-netdev", "user,id=net0,"