[Virtio-fs] [PATCH v2 07/10] virtiofsd: Use qemu_get_runtime_dir()

Stefan Hajnoczi stefanha at redhat.com
Thu Sep 21 12:58:28 UTC 2023


On Thu, Nov 10, 2022 at 07:06:26PM +0900, Akihiko Odaki wrote:
> qemu_get_runtime_dir() is used to construct the path to a lock file.
> 
> Signed-off-by: Akihiko Odaki <akihiko.odaki at daynix.com>
> ---
>  tools/virtiofsd/fuse_virtio.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c
> index 9368e292e4..b9eeed85e6 100644
> --- a/tools/virtiofsd/fuse_virtio.c
> +++ b/tools/virtiofsd/fuse_virtio.c
> @@ -901,12 +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 *run = NULL;
>      g_autofree gchar *dir = NULL;
>      Error *local_err = NULL;
>  
> -    state = qemu_get_local_state_dir();
> -    dir = g_build_filename(state, "run", "virtiofsd", NULL);
> +    run = qemu_get_runtime_dir();
> +    dir = g_build_filename(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",

tools/virtiofsd/ no longer exists. Which version of QEMU did you develop against?

commit e0dc2631ec4ac718ebe22ddea0ab25524eb37b0e
Author: Dr. David Alan Gilbert <dgilbert at redhat.com>
Date:   Wed Jan 18 12:11:51 2023 +0000

    virtiofsd: Remove source

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virtio-fs/attachments/20230921/9ba31686/attachment.sig>


More information about the Virtio-fs mailing list