From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52852 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTFfe-0004HT-Kh for qemu-devel@nongnu.org; Mon, 28 Jun 2010 10:50:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTFfd-0004Ui-FK for qemu-devel@nongnu.org; Mon, 28 Jun 2010 10:50:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54489) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTFfd-0004UQ-4x for qemu-devel@nongnu.org; Mon, 28 Jun 2010 10:50:49 -0400 Message-ID: <4C28B6C2.4030807@redhat.com> Date: Mon, 28 Jun 2010 16:50:42 +0200 From: Jes Sorensen MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 14/17] Move daemonize handling to OS specific files References: <1276162951-842-1-git-send-email-Jes.Sorensen@redhat.com> <1276162951-842-15-git-send-email-Jes.Sorensen@redhat.com> <1277484082.24464.24.camel@mendozza.osrc.amd.com> <4C24E111.7080606@redhat.com> <1277487263.24464.37.camel@mendozza.osrc.amd.com> In-Reply-To: <1277487263.24464.37.camel@mendozza.osrc.amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Frank Arnold Cc: "Przywara, Andre" , "qemu-devel@nongnu.org" On 06/25/10 19:34, Frank Arnold wrote: > We are doing KVM testing, so it is Linux. > > What I did is putting lines like this somewhere into vl.c and > os-posix.c: > fprintf(stderr, "os: QEMU_OPTION_daemonize: %i", QEMU_OPTION_daemonize); > fprintf(stderr, "vl: QEMU_OPTION_daemonize: %i", QEMU_OPTION_daemonize); > > Resulting in the following output on stderr: > os: QEMU_OPTION_daemonize: 85 > vl: QEMU_OPTION_daemonize: 86 > > No compile time errors. The preprocessing of qemu-options.h is done > separately for both files. This results in a missing option definition > for os-posix.c and discrepancy in the option enumeration. Hi Frank, I figured out what was causing it. qemu-options.def has an #ifdef MAP_POPULATE in it, which isn't being set without sys/mmap.h being included. Pretty much every other #ifdef in qemu-options.def are based on CONFIG_foo settings or things like _WIN32 which do not change depending on header file inclusion. I think the easiest fix is to just add sys/mmap.h to the include list in os-posix.c, so I just posted a patch for that. Though, in principle we really shouldn't base qemu-options.def settings on defines pulled in from system header files. Cheers, Jes