qemu-ga: use state dir from CONFIG_QEMU_LOCALSTATEDIR
commit6a3c8c14c8467c5db3539f1b6e43e03318e5e21b
authorLuiz Capitulino <lcapitulino@redhat.com>
Wed, 3 Oct 2012 21:35:58 +0000 (3 18:35 -0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 9 Oct 2012 08:40:14 +0000 (9 03:40 -0500)
tree51821094e68d9f68f9f0b436231b53b507b5e705
parent785c23ae5cf1d697834a635daf45b0a6bd93c00f
qemu-ga: use state dir from CONFIG_QEMU_LOCALSTATEDIR

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>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qemu-ga.c