From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH for-4.6 6/8] tools/libxl: Prepare to write multiple records with EMULATOR headers Date: Thu, 30 Jul 2015 18:36:19 +0100 Message-ID: <55BA6093.5010500@citrix.com> References: <1438119883-8083-1-git-send-email-andrew.cooper3@citrix.com> <1438119883-8083-7-git-send-email-andrew.cooper3@citrix.com> <21944.48907.889887.41847@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21944.48907.889887.41847@mariner.uk.xensource.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: Ian Jackson Cc: Wei Liu , Ian Campbell , Xen-devel List-Id: xen-devel@lists.xenproject.org On 29/07/15 12:54, Ian Jackson wrote: > Andrew Cooper writes ("[PATCH for-4.6 6/8] tools/libxl: Prepare to write multiple records with EMULATOR headers"): >> With the newly specified EMULATOR_XENSTORE_DATA record, there are two >> libxl records with an emulator subheader. Refactor the existing code to >> make future additions easier. > ... >> @@ -164,6 +198,7 @@ void libxl__stream_write_init(libxl__stream_write_state *stream) >> FILLZERO(stream->emu_dc); >> stream->emu_carefd = NULL; >> FILLZERO(stream->emu_rec_hdr); >> + FILLZERO(stream->emu_sub_hdr); > This this just cautionary ? Yes - the _init() function here initialises all private data. Most of it is probably not strictly necessary. > >> + if (dss->type == LIBXL_DOMAIN_TYPE_HVM) { >> + switch(libxl__device_model_version_running(gc, dss->domid)) { > I know you are just moving this code, but: space needed after > `switch'. So I do. ~Andrew