@@ -46,12 +46,11 @@
#define QGA_VIRTIO_PATH_DEFAULT "/dev/virtio-ports/org.qemu.guest_agent.0"
#endif /* __FreeBSD__ */
#define QGA_SERIAL_PATH_DEFAULT "/dev/ttyS0"
-#define QGA_STATE_RELATIVE_DIR "run"
#else
#define QGA_VIRTIO_PATH_DEFAULT "\\\\.\\Global\\org.qemu.guest_agent.0"
-#define QGA_STATE_RELATIVE_DIR "qemu-ga"
#define QGA_SERIAL_PATH_DEFAULT "COM1"
#endif
+#define QGA_STATE_RELATIVE_DIR "qemu-ga"
#ifdef CONFIG_FSFREEZE
#define QGA_FSFREEZE_HOOK_DEFAULT CONFIG_QEMU_CONFDIR "/fsfreeze-hook"
#endif
@@ -128,12 +127,12 @@ static void stop_agent(GAState *s, bool requested);
static void
init_dfl_pathnames(void)
{
- g_autofree char *state = qemu_get_local_state_dir();
+ g_autofree char *run = qemu_get_runtime_dir();
g_assert(dfl_pathnames.state_dir == NULL);
g_assert(dfl_pathnames.pidfile == NULL);
- dfl_pathnames.state_dir = g_build_filename(state, QGA_STATE_RELATIVE_DIR, NULL);
- dfl_pathnames.pidfile = g_build_filename(state, QGA_STATE_RELATIVE_DIR, "qemu-ga.pid", NULL);
+ dfl_pathnames.state_dir = g_build_filename(run, QGA_STATE_RELATIVE_DIR, NULL);
+ dfl_pathnames.pidfile = g_build_filename(run, QGA_STATE_RELATIVE_DIR, "qemu-ga.pid", NULL);
}
static void quit_handler(int sig)
qemu_get_runtime_dir() is used to construct the default state directory. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> --- qga/main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)