qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 0/7] util: Introduce qemu_get_runtime_dir()


From: Michael Tokarev
Subject: Re: [PATCH v4 0/7] util: Introduce qemu_get_runtime_dir()
Date: Tue, 16 Jul 2024 12:41:52 +0300
User-agent: Mozilla Thunderbird

16.07.2024 12:32, Akihiko Odaki wrote:
On 2024/07/16 17:06, Michael Tokarev wrote:

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.

You can pass NULL as filename and get the directory itself.

/mjt

--
GPG Key transition (from rsa2048 to rsa4096) since 2024-04-24.
New key: rsa4096/61AD3D98ECDF2C8E  9D8B E14E 3F2A 9DD7 9199  28F1 61AD 3D98 
ECDF 2C8E
Old key: rsa2048/457CE0A0804465C5  6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 
8044 65C5
Transition statement: http://www.corpit.ru/mjt/gpg-transition-2024.txt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]