mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06: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:
parent
1b34d08f0b
commit
1fbf2665e6
6 changed files with 18 additions and 21 deletions
|
@ -901,10 +901,12 @@ static bool fv_socket_lock(struct fuse_session *se)
|
|||
{
|
||||
g_autofree gchar *sk_name = NULL;
|
||||
g_autofree gchar *pidfile = NULL;
|
||||
g_autofree gchar *state = NULL;
|
||||
g_autofree gchar *dir = NULL;
|
||||
Error *local_err = NULL;
|
||||
|
||||
dir = qemu_get_local_state_pathname("run/virtiofsd");
|
||||
state = qemu_get_local_state_dir();
|
||||
dir = g_build_filename(state, "run", "virtiofsd", NULL);
|
||||
|
||||
if (g_mkdir_with_parents(dir, S_IRWXU) < 0) {
|
||||
fuse_log(FUSE_LOG_ERR, "%s: Failed to create directory %s: %s\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue