From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-ga: use state dir from CONFIG_QEMU_LOCALSTATEDIR
Date: Thu, 4 Oct 2012 12:37:55 -0500 [thread overview]
Message-ID: <20121004173755.GH16157@illuin> (raw)
In-Reply-To: <20121004125015.70d0028f@doriath.home>
On Thu, Oct 04, 2012 at 12:50:15PM -0300, Luiz Capitulino wrote:
> On Thu, 4 Oct 2012 10:47:06 -0500
> Michael Roth <mdroth@linux.vnet.ibm.com> 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 <lcapitulino@redhat.com>
> > > ---
> > > 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 <mdroth@linux.vnet.ibm.com>
>
> Btw, is this going through your tree?
Yup, was planning on sending a pull tomorrow after some basic testing.
Same for the standalone pidfile fix-up.
>
> >
> > > #define QGA_SENTINEL_BYTE 0xFF
> > >
> > > struct GAState {
> > > --
> > > 1.7.12.315.g682ce8b
> > >
> >
>
next prev parent reply other threads:[~2012-10-04 17:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 21:35 [Qemu-devel] [PATCH v2 0/2] qemu-ga: change default state dir to /var/run Luiz Capitulino
2012-10-03 21:35 ` [Qemu-devel] [PATCH 1/2] configure: add --localstatedir Luiz Capitulino
2012-10-04 15:39 ` Michael Roth
2012-10-03 21:35 ` [Qemu-devel] [PATCH 2/2] qemu-ga: use state dir from CONFIG_QEMU_LOCALSTATEDIR Luiz Capitulino
2012-10-04 15:47 ` Michael Roth
2012-10-04 15:50 ` Luiz Capitulino
2012-10-04 17:37 ` Michael Roth [this message]
2012-10-04 17:48 ` Luiz Capitulino
2012-10-04 18:01 ` Michael Roth
2012-10-04 7:07 ` [Qemu-devel] [PATCH v2 0/2] qemu-ga: change default state dir to /var/run Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121004173755.GH16157@illuin \
--to=mdroth@linux.vnet.ibm.com \
--cc=lcapitulino@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).