From 1fbf2665e6773d87657c2a1654d9bf272a4f1ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 20 Apr 2022 17:26:21 +0400 Subject: util: replace qemu_get_local_state_pathname() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-39-marcandre.lureau@redhat.com> --- include/qemu/osdep.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 4bf2883..baaa23c 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -556,16 +556,13 @@ void qemu_set_cloexec(int fd); void fips_set_state(bool requested); bool fips_get_state(void); -/* Return a dynamically allocated pathname denoting a file or directory that is - * appropriate for storing local state. - * - * @relative_pathname need not start with a directory separator; one will be - * added automatically. +/* Return a dynamically allocated directory path that is appropriate for storing + * local state. * * The caller is responsible for releasing the value returned with g_free() * after use. */ -char *qemu_get_local_state_pathname(const char *relative_pathname); +char *qemu_get_local_state_dir(void); /* Find program directory, and save it for later usage with * qemu_get_exec_dir(). -- cgit v1.1