From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcISu-0005Os-FF for qemu-devel@nongnu.org; Thu, 30 Jun 2011 10:43:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcISt-0003ut-26 for qemu-devel@nongnu.org; Thu, 30 Jun 2011 10:43:36 -0400 Received: from cantor2.suse.de ([195.135.220.15]:51709 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcISs-0003un-IL for qemu-devel@nongnu.org; Thu, 30 Jun 2011 10:43:34 -0400 Message-ID: <4E0C8B95.2050105@suse.de> Date: Thu, 30 Jun 2011 16:43:33 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1309346169-14554-1-git-send-email-stefano.stabellini@eu.citrix.com> In-Reply-To: <1309346169-14554-1-git-send-email-stefano.stabellini@eu.citrix.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] xen: introduce xen_change_state_handler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: stefano.stabellini@eu.citrix.com Cc: Anthony PERARD , xen-devel@lists.xensource.com, qemu-devel@nongnu.org On 06/29/2011 01:16 PM, stefano.stabellini@eu.citrix.com wrote: > From: Anthony PERARD > > Remove the call to xenstore_record_dm_state from xen_main_loop_prepare > that is HVM specific. > Add a new vm_change_state_handler shared between xen_pv and xen_hvm > machines to record the VM state to xenstore. > > Signed-off-by: Anthony PERARD > Signed-off-by: Stefano Stabellini > --- > xen-all.c | 25 ++++++++++++++++++------- > 1 files changed, 18 insertions(+), 7 deletions(-) > > diff --git a/xen-all.c b/xen-all.c > index 3fd04ef..e8da35f 100644 > --- a/xen-all.c > +++ b/xen-all.c > @@ -797,12 +797,17 @@ void xenstore_store_pv_console_info(int i, CharDr= iverState *chr) > } > } > > -static void xenstore_record_dm_state(XenIOState *s, const char *state) > +static void xenstore_record_dm_state(struct xs_handle *xs, const char = *state) > { > char path[50]; > > + if (xs =3D=3D NULL) { > + fprintf(stderr, "xenstore connection not initialized\n"); > + exit(1); > + } /studio/tmp/agraf/xen-all.c: In function =91xenstore_record_dm_state=92: /studio/tmp/agraf/xen-all.c:744: error: =91xs=92 undeclared (first use in= =20 this function) /studio/tmp/agraf/xen-all.c:744: error: (Each undeclared identifier is=20 reported only once /studio/tmp/agraf/xen-all.c:744: error: for each function it appears in.) Alex From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: Re: [PATCH] xen: introduce xen_change_state_handler Date: Thu, 30 Jun 2011 16:43:33 +0200 Message-ID: <4E0C8B95.2050105@suse.de> References: <1309346169-14554-1-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1309346169-14554-1-git-send-email-stefano.stabellini@eu.citrix.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: stefano.stabellini@eu.citrix.com Cc: Anthony PERARD , xen-devel@lists.xensource.com, qemu-devel@nongnu.org List-Id: xen-devel@lists.xenproject.org On 06/29/2011 01:16 PM, stefano.stabellini@eu.citrix.com wrote: > From: Anthony PERARD > > Remove the call to xenstore_record_dm_state from xen_main_loop_prepare > that is HVM specific. > Add a new vm_change_state_handler shared between xen_pv and xen_hvm > machines to record the VM state to xenstore. > > Signed-off-by: Anthony PERARD > Signed-off-by: Stefano Stabellini > --- > xen-all.c | 25 ++++++++++++++++++------- > 1 files changed, 18 insertions(+), 7 deletions(-) > > diff --git a/xen-all.c b/xen-all.c > index 3fd04ef..e8da35f 100644 > --- a/xen-all.c > +++ b/xen-all.c > @@ -797,12 +797,17 @@ void xenstore_store_pv_console_info(int i, CharDr= iverState *chr) > } > } > > -static void xenstore_record_dm_state(XenIOState *s, const char *state) > +static void xenstore_record_dm_state(struct xs_handle *xs, const char = *state) > { > char path[50]; > > + if (xs =3D=3D NULL) { > + fprintf(stderr, "xenstore connection not initialized\n"); > + exit(1); > + } /studio/tmp/agraf/xen-all.c: In function =91xenstore_record_dm_state=92: /studio/tmp/agraf/xen-all.c:744: error: =91xs=92 undeclared (first use in= =20 this function) /studio/tmp/agraf/xen-all.c:744: error: (Each undeclared identifier is=20 reported only once /studio/tmp/agraf/xen-all.c:744: error: for each function it appears in.) Alex