From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55750 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7li0-0003s9-A0 for qemu-devel@nongnu.org; Mon, 18 Oct 2010 05:08:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7lhz-0001s8-4q for qemu-devel@nongnu.org; Mon, 18 Oct 2010 05:08:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7lhy-0001re-Uq for qemu-devel@nongnu.org; Mon, 18 Oct 2010 05:08:43 -0400 Message-ID: <4CBC0E96.2050704@redhat.com> Date: Mon, 18 Oct 2010 11:08:38 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1287389754-985-1-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1287389754-985-1-git-send-email-Jes.Sorensen@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v3 0/9] Re-factor osdep code + macro and brace fixes List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jes.Sorensen@redhat.com Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org On 10/18/2010 10:15 AM, Jes.Sorensen@redhat.com wrote: > From: Jes Sorensen > > Hi, > > Here is another set of patches which tries to split up osdep.c further > into posix and win32 versions. It introduces oslib-{posix,win32}.c > files which are used for functions that are OS specific core library > functionality, like gettimeofday(), and which is used by both QEMU and > support applications like qemu-img. Other functions are moved to > os-{posix,win32}.c. In addtion there are a couple of minor fixes for > bad macro names. > > In some cases braces were added to code when it was moved, to make it > compliant with the QEMU bracing rules. > > v3 fixes the issues pointed out by Blue Swirl, notably it moves the > win32 ffs prototype to qemu-common.h which is consistent with it being > provided by strings.h for POSIX, and fixes linking of linux-user. > > Cheers, > Jes > > Jes Sorensen (9): > Move QEMU OS dependant library functions to OS specific files > Move osdep socket code to oslib-{posix,win32}.c > qemu_pipe() is used only by POSIX code, so move to oslib-posix.c > We only support eventfd under POSIX, move qemu_eventfd() to > os-posix.c > Move qemu_gettimeofday() to OS specific files > Do not redefine reserved key-words TRUE/FALSE > Separate qemu_pidfile() into OS specific versions > Consolidate oom_check() functions > Remove unncessary includes > > Makefile | 6 +- > Makefile.objs | 9 ++- > Makefile.target | 2 +- > hw/bt-sdp.c | 20 ++-- > os-posix.c | 53 +++++++++++ > os-win32.c | 24 +++++ > osdep.c | 256 ---------------------------------------------------- > osdep.h | 15 --- > oslib-posix.c | 109 ++++++++++++++++++++++ > oslib-win32.c | 121 +++++++++++++++++++++++++ > posix-aio-compat.c | 1 + > qemu-common.h | 6 ++ > qemu-img.c | 1 + > qemu-malloc.c | 14 +--- > qemu-os-posix.h | 3 + > qemu-os-win32.h | 8 ++ > qemu-tool.c | 1 + > 17 files changed, 352 insertions(+), 297 deletions(-) > create mode 100644 oslib-posix.c > create mode 100644 oslib-win32.c > ACK Paolo