mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
util: replace qemu_get_local_state_pathname()
Simplify the function to only return the directory path. Callers are adjusted to use the GLib function to build paths, g_build_filename(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220420132624.2439741-39-marcandre.lureau@redhat.com>
This commit is contained in:
@ -77,8 +77,10 @@ static int gid = -1;
|
||||
|
||||
static void compute_default_paths(void)
|
||||
{
|
||||
socket_path = qemu_get_local_state_pathname("run/qemu-pr-helper.sock");
|
||||
pidfile = qemu_get_local_state_pathname("run/qemu-pr-helper.pid");
|
||||
g_autofree char *state = qemu_get_local_state_dir();
|
||||
|
||||
socket_path = g_build_filename(state, "run", "qemu-pr-helper.sock", NULL);
|
||||
pidfile = g_build_filename(state, "run", "qemu-pr-helper.pid", NULL);
|
||||
}
|
||||
|
||||
static void usage(const char *name)
|
||||
|
Reference in New Issue
Block a user