# Path: elbepack/shellhelper.py
# def command_out(cmd, stdin=None, output=PIPE, env_add=None):
#     """command_out() - Execute cmd in a shell.
# 
#     Returns a tuple with the exitcode and the output of cmd.
# 
#     --
# 
#     >>> command_out("true")
#     (0, '')
# 
#     >>> command_out("$TRUE && true", env_add={"TRUE":"true"})
#     (0, '')
# 
#     >>> command_out("cat -", stdin=b"ELBE")
#     (0, 'ELBE')
# 
#     >>> command_out("2>&1 cat -", stdin=b"ELBE")
#     (0, 'ELBE')
# 
#     >>> command_out("2>&1 cat -", stdin="ELBE")
#     (0, 'ELBE')
# 
#     >>> command_out("false")
#     (1, '')
# 
#     """
#     new_env = os.environ.copy()
#     if env_add:
#         new_env.update(env_add)
# 
#     if isinstance(stdin, str):
#         stdin = stdin.encode()
# 
#     if stdin is None:
#         p = Popen(cmd, shell=True,
#                   stdout=output, stderr=STDOUT, env=new_env)
#         out, _ = p.communicate()
#     else:
#         p = Popen(cmd, shell=True,
#                   stdout=output, stderr=STDOUT, stdin=PIPE, env=new_env)
#         out, _ = p.communicate(input=stdin)
# 
#     out = TextIOWrapper(BytesIO(out), encoding='utf-8', errors='replace').read()
# 
#     return p.returncode, out


import os
from elbepack.shellhelper import command_out
# ELBE - Debian Based Embedded Rootfilesystem Builder
# Copyright (c) 2016 Torben Hohn <torben.hohn@linutronix.de>
# Copyright (c) 2017 Kurt Kanzenbach <kurt@linutronix.de>
# Copyright (c) 2017 Manuel Traut <manut@linutronix.de>
#
# SPDX-License-Identifier: GPL-3.0-or-later



kvm_exe_list = [
    '/usr/bin/kvm',
    '/usr/bin/qemu-kvm',

# Path: elbepack/shellhelper.py
# def command_out(cmd, stdin=None, output=PIPE, env_add=None):
#     """command_out() - Execute cmd in a shell.
# 
#     Returns a tuple with the exitcode and the output of cmd.
# 
#     --
# 
#     >>> command_out("true")
#     (0, '')
# 
#     >>> command_out("$TRUE && true", env_add={"TRUE":"true"})
#     (0, '')
# 
#     >>> command_out("cat -", stdin=b"ELBE")
#     (0, 'ELBE')
# 
#     >>> command_out("2>&1 cat -", stdin=b"ELBE")
#     (0, 'ELBE')
# 
#     >>> command_out("2>&1 cat -", stdin="ELBE")
#     (0, 'ELBE')
# 
#     >>> command_out("false")
#     (1, '')
# 
#     """
#     new_env = os.environ.copy()
#     if env_add:
#         new_env.update(env_add)
# 
#     if isinstance(stdin, str):
#         stdin = stdin.encode()
# 
#     if stdin is None:
#         p = Popen(cmd, shell=True,
#                   stdout=output, stderr=STDOUT, env=new_env)
#         out, _ = p.communicate()
#     else:
#         p = Popen(cmd, shell=True,
#                   stdout=output, stderr=STDOUT, stdin=PIPE, env=new_env)
#         out, _ = p.communicate(input=stdin)
# 
#     out = TextIOWrapper(BytesIO(out), encoding='utf-8', errors='replace').read()
# 
#     return p.returncode, out


# Path: elbepack/kvm.py
import os
from elbepack.shellhelper import command_out

# ELBE - Debian Based Embedded Rootfilesystem Builder
# Copyright (c) 2016 Torben Hohn <torben.hohn@linutronix.de>
# Copyright (c) 2017 Kurt Kanzenbach <kurt@linutronix.de>
# Copyright (c) 2017 Manuel Traut <manut@linutronix.de>
#
# SPDX-License-Identifier: GPL-3.0-or-later



kvm_exe_list = [
    '/usr/bin/kvm',
    '/usr/bin/qemu-kvm',

    '/usr/libexec/qemu-kvm',