mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
run: make qemu-img more resilient to --prebuilt by not doing -T in that case
This commit is contained in:
26
common.py
26
common.py
@@ -538,8 +538,11 @@ def print_time(ellapsed_seconds):
|
|||||||
|
|
||||||
def raw_to_qcow2(prebuilt=False, reverse=False):
|
def raw_to_qcow2(prebuilt=False, reverse=False):
|
||||||
if prebuilt:
|
if prebuilt:
|
||||||
|
disable_trace = []
|
||||||
qemu_img_executable = common.qemu_img_basename
|
qemu_img_executable = common.qemu_img_basename
|
||||||
else:
|
else:
|
||||||
|
# Prevent qemu-img from generating trace files like QEMU. Disgusting.
|
||||||
|
disable_trace = ['-T', 'pr_manager_run,file=/dev/null', common.Newline,]
|
||||||
qemu_img_executable = common.qemu_img_executable
|
qemu_img_executable = common.qemu_img_executable
|
||||||
infmt = 'raw'
|
infmt = 'raw'
|
||||||
outfmt = 'qcow2'
|
outfmt = 'qcow2'
|
||||||
@@ -552,16 +555,19 @@ def raw_to_qcow2(prebuilt=False, reverse=False):
|
|||||||
tmp = infile
|
tmp = infile
|
||||||
infile = outfile
|
infile = outfile
|
||||||
outfile = tmp
|
outfile = tmp
|
||||||
common.run_cmd([
|
common.run_cmd(
|
||||||
qemu_img_executable, common.Newline,
|
[
|
||||||
# Prevent qemu-img from generating trace files like QEMU. Disgusting.
|
qemu_img_executable, common.Newline,
|
||||||
'-T', 'pr_manager_run,file=/dev/null', common.Newline,
|
'convert', common.Newline,
|
||||||
'convert', common.Newline,
|
] +
|
||||||
'-f', infmt, common.Newline,
|
disable_trace +
|
||||||
'-O', outfmt, common.Newline,
|
[
|
||||||
infile, common.Newline,
|
'-f', infmt, common.Newline,
|
||||||
outfile, common.Newline,
|
'-O', outfmt, common.Newline,
|
||||||
])
|
infile, common.Newline,
|
||||||
|
outfile, common.Newline,
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
def resolve_args(defaults, args, extra_args):
|
def resolve_args(defaults, args, extra_args):
|
||||||
if extra_args is None:
|
if extra_args is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user