From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJoVN-0006VD-Ml for qemu-devel@nongnu.org; Thu, 04 Oct 2012 12:42:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJoVH-0007Nw-H3 for qemu-devel@nongnu.org; Thu, 04 Oct 2012 12:42:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJng5-0007Cd-EM for qemu-devel@nongnu.org; Thu, 04 Oct 2012 11:49:33 -0400 Date: Thu, 4 Oct 2012 12:50:15 -0300 From: Luiz Capitulino Message-ID: <20121004125015.70d0028f@doriath.home> In-Reply-To: <20121004154706.GF16157@illuin> References: <1349300158-19113-1-git-send-email-lcapitulino@redhat.com> <1349300158-19113-3-git-send-email-lcapitulino@redhat.com> <20121004154706.GF16157@illuin> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-ga: use state dir from CONFIG_QEMU_LOCALSTATEDIR List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: pbonzini@redhat.com, qemu-devel@nongnu.org On Thu, 4 Oct 2012 10:47:06 -0500 Michael Roth wrote: > On Wed, Oct 03, 2012 at 06:35:58PM -0300, Luiz Capitulino wrote: > > Has the side effect of changing the default directory used to > > save the freeze status file from /tmp to ${prefix}/var/run. > > > > This is a beneficial change for two reasons: > > > > 1. FHS states that programs must not assume that files in /tmp will > > still exist between invocations of the program. This defeats > > the purpose of the freeze status file > > > > 2. FHS dictates that /var/run must be cleaned on boot, this > > ensures that a stale freeze status file will be removed on boot > > > > Signed-off-by: Luiz Capitulino > > --- > > qemu-ga.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/qemu-ga.c b/qemu-ga.c > > index b747470..daeaea5 100644 > > --- a/qemu-ga.c > > +++ b/qemu-ga.c > > @@ -40,8 +40,8 @@ > > #else > > #define QGA_VIRTIO_PATH_DEFAULT "\\\\.\\Global\\org.qemu.guest_agent.0" > > #endif > > -#define QGA_PIDFILE_DEFAULT "/var/run/qemu-ga.pid" > > -#define QGA_STATEDIR_DEFAULT "/tmp" > > +#define QGA_STATEDIR_DEFAULT CONFIG_QEMU_LOCALSTATEDIR "/run" > > +#define QGA_PIDFILE_DEFAULT QGA_STATEDIR_DEFAULT "/qemu-ga.pid" > > Just to confirm, in configure we have: > > echo "qemu_localstatedir=$local_statedir" >> $config_host_mak > > Is there some magic that generates a CONFIG_QEMU_LOCALSTATEDIR with the > same value? If so: Yes, that's done by scripts/create_config > Reviewed-by: Michael Roth Btw, is this going through your tree? > > > #define QGA_SENTINEL_BYTE 0xFF > > > > struct GAState { > > -- > > 1.7.12.315.g682ce8b > > >