pmb qemu: Properly escape kernel commandline
This commit is contained in:
parent
74e103d1f2
commit
b56e5cf281
|
@ -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,"
|
||||||
|
|
Loading…
Reference in New Issue