From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLcIJ-00034n-1t for qemu-devel@nongnu.org; Fri, 18 Dec 2009 07:50:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLcIE-00033u-EX for qemu-devel@nongnu.org; Fri, 18 Dec 2009 07:50:54 -0500 Received: from [199.232.76.173] (port=60326 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLcIE-00033r-8h for qemu-devel@nongnu.org; Fri, 18 Dec 2009 07:50:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53407) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLcIE-0005zo-2E for qemu-devel@nongnu.org; Fri, 18 Dec 2009 07:50:50 -0500 Message-ID: <4B2B7A62.3030503@redhat.com> Date: Fri, 18 Dec 2009 13:49:38 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1261129507-13244-1-git-send-email-andre.przywara@amd.com> <1261139878-28751-1-git-send-email-andre.przywara@amd.com> In-Reply-To: <1261139878-28751-1-git-send-email-andre.przywara@amd.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v2] osdep: Fix runtime failure on older Linux kernels List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andre Przywara Cc: qemu-devel@nongnu.org Am 18.12.2009 13:37, schrieb Andre Przywara: > If QEMU finds newer kernel header files on compilation time, it will use > advertised features like pipe2 or SOCK_CLOEXEC by just doing a compile test. > If later the executables are executed on an older kernel (<2.6.27, > like Xen Dom0 2.6.18), then QEMU will fail on opening sockets and creating > pipes and returns the rather unspecific "qemu_init_main_loop failed". > This patch fixes this by checking the return values of these calls > for EINVAL and ENOSYS and falling back to the older versions automatically. > > Signed-off-by: Andre Przywara > --- > osdep.c | 18 ++++++++++++------ > 1 files changed, 12 insertions(+), 6 deletions(-) > > v2 changed the errno check from EINVAL to ENOSYS for accept4 Acked-by: Kevin Wolf I think this patch even qualifies for stable, though this might mean 0.12.1 now. Kevin