diff options
author | Laszlo Ersek <lersek@redhat.com> | 2013-05-18 06:31:53 +0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2013-05-30 11:37:37 -0500 |
commit | a839ee77c786a8200c76ca92f697eebf6bcc9aa3 (patch) | |
tree | ae11e9fc0f3850d32cac7fafa8d66223983d0df5 /qga/service-win32.c | |
parent | a880845f3d92e508e43fcc38f0631b91c203e5d5 (diff) | |
download | qemu-a839ee77c786a8200c76ca92f697eebf6bcc9aa3.tar.gz qemu-a839ee77c786a8200c76ca92f697eebf6bcc9aa3.tar.bz2 qemu-a839ee77c786a8200c76ca92f697eebf6bcc9aa3.zip |
qga: save state directory in ga_install_service()
If the user selects a non-default state directory at service installation
time, we should remember it in the registered service.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qga/service-win32.c')
-rw-r--r-- | qga/service-win32.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qga/service-win32.c b/qga/service-win32.c index 8a5de8a8b9..02926abb28 100644 --- a/qga/service-win32.c +++ b/qga/service-win32.c @@ -35,7 +35,8 @@ static int printf_win_error(const char *text) return n; } -int ga_install_service(const char *path, const char *logfile) +int ga_install_service(const char *path, const char *logfile, + const char *state_dir) { SC_HANDLE manager; SC_HANDLE service; @@ -56,6 +57,9 @@ int ga_install_service(const char *path, const char *logfile) if (logfile) { g_string_append_printf(cmdline, " -l %s -v", logfile); } + if (state_dir) { + g_string_append_printf(cmdline, " -t %s", state_dir); + } g_debug("service's cmdline: %s", cmdline->str); |