From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gA1OW-0003N0-GQ for qemu-devel@nongnu.org; Tue, 09 Oct 2018 19:26:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gA1OV-0000ne-Ib for qemu-devel@nongnu.org; Tue, 09 Oct 2018 19:26:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37748) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gA1OS-0000kr-3M for qemu-devel@nongnu.org; Tue, 09 Oct 2018 19:26:24 -0400 From: Cleber Rosa Date: Tue, 9 Oct 2018 19:26:03 -0400 Message-Id: <20181009232607.15521-4-crosa@redhat.com> In-Reply-To: <20181009232607.15521-1-crosa@redhat.com> References: <20181009232607.15521-1-crosa@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 3/7] scripts/qemu.py: add method and private attribute for arch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , Eduardo Habkost , Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Caio Carrara , Stefan Hajnoczi , Laszlo Ersek Because some sane defaults may require the knowledge of the arch, let's give the QEMUMachine the opportunity to hold that information. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- scripts/qemu.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/qemu.py b/scripts/qemu.py index f099ce7278..d9e24a0c1a 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -113,6 +113,7 @@ class QEMUMachine(object): self._test_dir =3D test_dir self._temp_dir =3D None self._launched =3D False + self._arch =3D None self._machine =3D None self._console_device_type =3D None self._console_address =3D None @@ -406,6 +407,12 @@ class QEMUMachine(object): ''' self._args.extend(args) =20 + def set_arch(self, arch): + """ + Sets the architecture of this machine + """ + self._arch =3D arch + def set_machine(self, machine_type): ''' Sets the machine type --=20 2.17.1