Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHO2X-0006Cc-8j for qemu-devel@nongnu.org; Thu, 18 Jun 2009 16:16:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHO2S-000659-4f for qemu-devel@nongnu.org; Thu, 18 Jun 2009 16:16:52 -0400 Received: from [199.232.76.173] (port=33253 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHO2R-00064n-Mj for qemu-devel@nongnu.org; Thu, 18 Jun 2009 16:16:47 -0400 Received: from mx2.redhat.com ([66.187.237.31]:58678) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MHO2R-0008G2-41 for qemu-devel@nongnu.org; Thu, 18 Jun 2009 16:16:47 -0400 Date: Thu, 18 Jun 2009 17:16:39 -0300 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH v4] avoid compilation warning/errors on up to date Message-ID: <20090618171639.1a3c1364@doriath> In-Reply-To: <200906180116.37819.jcd@tribudubois.net> References: <200906172322.35496.jcd@tribudubois.net> <200906180041.31816.jcd@tribudubois.net> <4A39737F.7070101@codemonkey.ws> <200906180116.37819.jcd@tribudubois.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jean-Christophe Dubois Cc: qemu-devel@nongnu.org On Thu, 18 Jun 2009 01:16:37 +0200 "Jean-Christophe Dubois" wrote: > And whatever I have added is a lot more robust than what was before. > Once again, please just show me where my patch is incorrect and I > will fix it. I really missed this v4, sorry for that and thanks for letting me know. I think the first step is to do one logical change at a time. You could, for example do: 1. Add qemu_read() and qemu_write() 2. Port one subsystem per-patch for each of them Each lseek() or ftruncate() could also be done this way. Unrelated fixes should be in different patches. We also have to define how far we're going on this 'warning fixing' thing. read() and write() seems ok to me, now close() doesn't seem important. This is my personal suggestion on the topic, it doesn't represent upstream's view though. Also, I think qemu_read() and qemu_write() should abort on error, if that's what callers are going to do.