From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carlo Marcelo Arenas Belon Subject: [PATCH] Detect arch dynamically from uname instead of using hardcoded x86_64 value Date: Sun, 16 Sep 2007 04:49:35 -0500 Message-ID: <20070916094935.GB13973@tapir> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org The following patch is part of a series of fixes used to allow for the use of the kvm python wrapper in Gentoo Linux. In this case the value for the architecture used is retrieved from uname and used to identify the right qemu system binary name. Carlo Signed-off-by: Carlo Marcelo Arenas Belon --- kvm | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/kvm b/kvm index 0b509f6..d349efe 100755 --- a/kvm +++ b/kvm @@ -184,7 +184,8 @@ bootdisk = 'c' if options.install: bootdisk = 'd' -arch = 'x86_64' +uname = os.uname() +arch = uname[4] if arch == 'x86_64': cmd = 'qemu-system-' + arch -- 1.5.1.6 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/