On 2024/07/16 17:06, 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 ?
I'm not sure. Such a function would be certainly useful, but I slightly
feel such a function concerns with too many responsibilities. Getting a
runtime directory is one responsibility, and how to use is another. They
are clearly distinguished; it does not matter how the path to the
runtime directory is used after acquiring it. For example, you can keep
the path to the runtime directory, and derive the paths to two files in
the directory.
I don't object to such a change, but I rather keep this series as is
unless there is anything wrong else.
Regards,
Akihiko Odaki