From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [PATCH 3/5] Fixup dummy cpu setup. Date: Mon, 23 Mar 2009 12:25:15 +0100 Message-ID: <49C7719B.7080503@redhat.com> References: <1237564971-16188-1-git-send-email-kraxel@redhat.com> <1237564971-16188-4-git-send-email-kraxel@redhat.com> <20090320224154.GA2799@verge.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20090320224154.GA2799@verge.net.au> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Simon Horman Cc: xen-devel@lists.xensource.com, Ian.Jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Simon Horman wrote: >> - env = cpu_init(NULL); >> + if (cpu_model == NULL) { >> +#ifdef TARGET_X86_64 >> + cpu_model = "qemu64"; >> +#else >> + cpu_model = "qemu32"; >> +#endif >> + } >> + env = cpu_init(cpu_model); > Is there a way to achieve this without ifdef nastiness? Well, one could try to make cpu_init(NULL) pick a sane default. But in the end that most likely would just be moving the ifdef to another place. cheers, Gerd