summaryrefslogtreecommitdiffstats
path: root/scsi
diff options
context:
space:
mode:
authorMarc-André Lureau2022-04-20 15:26:21 +0200
committerMarc-André Lureau2022-04-21 15:09:09 +0200
commit1fbf2665e6773d87657c2a1654d9bf272a4f1ec0 (patch)
treecca3c06c3112551683a35f96fe1a04ab0a202c51 /scsi
parentutil: use qemu_create() in qemu_write_pidfile() (diff)
downloadqemu-1fbf2665e6773d87657c2a1654d9bf272a4f1ec0.tar.gz
qemu-1fbf2665e6773d87657c2a1654d9bf272a4f1ec0.tar.xz
qemu-1fbf2665e6773d87657c2a1654d9bf272a4f1ec0.zip
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>
Diffstat (limited to 'scsi')
-rw-r--r--scsi/qemu-pr-helper.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/scsi/qemu-pr-helper.c b/scsi/qemu-pr-helper.c
index df493e2a50..196b78c00d 100644
--- a/scsi/qemu-pr-helper.c
+++ b/scsi/qemu-pr-helper.c
@@ -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)