aboutsummaryrefslogtreecommitdiff
path: root/qemu-ga.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2012-10-03 18:35:58 -0300
committerMichael Roth <mdroth@linux.vnet.ibm.com>2012-10-09 03:40:14 -0500
commit6a3c8c14c8467c5db3539f1b6e43e03318e5e21b (patch)
tree51821094e68d9f68f9f0b436231b53b507b5e705 /qemu-ga.c
parent785c23ae5cf1d697834a635daf45b0a6bd93c00f (diff)
downloadqemu-6a3c8c14c8467c5db3539f1b6e43e03318e5e21b.zip
qemu-6a3c8c14c8467c5db3539f1b6e43e03318e5e21b.tar.gz
qemu-6a3c8c14c8467c5db3539f1b6e43e03318e5e21b.tar.bz2
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>
Diffstat (limited to 'qemu-ga.c')
-rw-r--r--qemu-ga.c4
1 files 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"
#define QGA_SENTINEL_BYTE 0xFF
struct GAState {