[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 0/7] util: Introduce qemu_get_runtime_dir()
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v4 0/7] util: Introduce qemu_get_runtime_dir() |
Date: |
Tue, 16 Jul 2024 10:56:20 +0100 |
User-agent: |
Mutt/2.2.12 (2023-09-09) |
On Tue, Jul 16, 2024 at 11:06:57AM +0300, Michael Tokarev wrote:
> 16.07.2024 10:27, Akihiko Odaki wrote:
> > qemu_get_runtime_dir() returns a dynamically allocated directory path
> > that is appropriate for storing runtime files. It corresponds to "run"
> > directory in Unix.
>
> Since runtime dir is always used with a filename within, how about
>
> char *qemu_get_runtime_path(const char *filename)
>
> which return RUNTIME_DIR/filename instead of just RUNTIME_DIR ?
Yeah, I agree, every single caller of the function goes on to call
g_build_filename with the result. The helper should just be building
the filename itself.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- Re: [PATCH v4 1/7] util: Introduce qemu_get_runtime_dir(), (continued)
- [PATCH v4 2/7] ivshmem-server: Use qemu_get_runtime_dir(), Akihiko Odaki, 2024/07/16
- [PATCH v4 4/7] scsi: Use qemu_get_runtime_dir(), Akihiko Odaki, 2024/07/16
- [PATCH v4 5/7] module: Use qemu_get_runtime_dir(), Akihiko Odaki, 2024/07/16
- [PATCH v4 3/7] qga: Use qemu_get_runtime_dir(), Akihiko Odaki, 2024/07/16
- [PATCH v4 6/7] util: Remove qemu_get_local_state_dir(), Akihiko Odaki, 2024/07/16
- [PATCH v4 7/7] spice-app: Use qemu_get_runtime_dir(), Akihiko Odaki, 2024/07/16
- Re: [PATCH v4 0/7] util: Introduce qemu_get_runtime_dir(), Michael Tokarev, 2024/07/16
Re: [PATCH v4 0/7] util: Introduce qemu_get_runtime_dir(), Paolo Bonzini, 2024/07/16