From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: Re: [PATCH v3 17/28] tools/libxl: Infrastructure for reading a libxl migration v2 stream Date: Mon, 13 Jul 2015 15:11:48 +0100 Message-ID: <21923.50980.894203.752666@mariner.uk.xensource.com> References: <1436788907-1921-1-git-send-email-andrew.cooper3@citrix.com> <1436788907-1921-18-git-send-email-andrew.cooper3@citrix.com> <1436794934.25044.9.camel@citrix.com> <55A3C2E9.6010501@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55A3C2E9.6010501@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Ross Lagerwall , Wei Liu , Ian Campbell , Xen-devel List-Id: xen-devel@lists.xenproject.org Andrew Cooper writes ("Re: [PATCH v3 17/28] tools/libxl: Infrastructure for reading a libxl migration v2 stream"): > On 13/07/15 14:42, Ian Campbell wrote: > > On Mon, 2015-07-13 at 13:01 +0100, Andrew Cooper wrote: > > Did you drop the assert prior to this on purpose? > > I think it got lost while splitting the _init() out. I shall re-introduce. Please don't. Or, if you do, please put in some comments in libxl_internal.h about the public states of a libxl__stream_read_state. Earlier i wrote: I don't mind this at all but I think if you do this you should: * provide an _init method * document that _init must be called before start and As far as I can tell, from the outside, this machinery has the usual Undefined/Idle/Active states. [...] It is usual for functions of this kind to take an Undefined struct and make it Active. See: - the comment in libxl_internal.h about `Event generation functions' - the following examples libxl__spawn_spawn (accepts Undefined, this is documented) libxl__bootloader_run (accepts Undefined, not documented) libxl__datacopier_start (accepts Undefined, not documented) libxl__openpty (accepts Undefined; no init method) Thanks, Ian.