pmb qemu: Properly escape kernel commandline

This commit is contained in:
Oliver Smith 2018-07-09 22:50:20 +02:00
parent 74e103d1f2
commit b56e5cf281
1 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ import logging
import os import os
import re import re
import signal import signal
import shlex
import shutil import shutil
import pmb.build import pmb.build
@ -137,7 +138,7 @@ def command_qemu(args, arch, device, img_path, spice_enabled):
command += ["-kernel", rootfs + "/boot/vmlinuz-" + flavor] command += ["-kernel", rootfs + "/boot/vmlinuz-" + flavor]
command += ["-initrd", rootfs + "/boot/initramfs-" + flavor] command += ["-initrd", rootfs + "/boot/initramfs-" + flavor]
command += ["-append", '"' + cmdline + '"'] command += ["-append", shlex.quote(cmdline)]
command += ["-m", str(args.memory)] command += ["-m", str(args.memory)]
command += ["-netdev", command += ["-netdev",
"user,id=net0," "user,id=net0,"