From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 2/6] libxl: portiblity fixes Date: Wed, 28 Jul 2010 10:21:54 +0100 Message-ID: References: <201007281106.01632.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <201007281106.01632.Christoph.Egger@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Christoph Egger , Ian Jackson Cc: "xen-devel@lists.xensource.com" , Stabellini Stefano List-Id: xen-devel@lists.xenproject.org On 28/07/2010 10:06, "Christoph Egger" wrote: >> This patch is wrong because it introduces a couple of function >> declarations but it does not introduce the definitions; your later >> patch which introduces the definitions is wrong because it introduces >> some functions which are intended to replace existing code, but the >> patch does not replace the existing code and the new functions are not >> called anywhere in that patch. > > The function declarations are the API and the function defintions > are the OS dependent implementations of the API. > Implementations and use of the API is used in different patches. > This is my understanding of defining and implementing an API > in C. I find that kind of way of splitting up a patch series annoying as well. As Ian said, we want each patch to be a logical and separate whole. That means providing an interface *and* its implementation. Possibly its users as well, depending on how complicated that bit is -- it's certainly arguable they belong in a separate patch, at least. > blktap support for linux and netbsd are very different in their > implementation. > In netbsd, blktap will be implemented using puffs > (http://netbsd.gw.com/cgi-bin/man-cgi?puffs+3+NetBSD-current) A bit of a sidestep I know, but: shouldn't the blktap library be hiding this osdep stuff? -- Keir