diff options
| author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-04-20 17:26:21 +0400 |
|---|---|---|
| committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-04-21 17:09:09 +0400 |
| commit | 1fbf2665e6773d87657c2a1654d9bf272a4f1ec0 (patch) | |
| tree | cca3c06c3112551683a35f96fe1a04ab0a202c51 /util/oslib-posix.c | |
| parent | 1b34d08f0b529ccf80e9da9d0928afa97d5d7807 (diff) | |
| download | focaccia-qemu-1fbf2665e6773d87657c2a1654d9bf272a4f1ec0.tar.gz focaccia-qemu-1fbf2665e6773d87657c2a1654d9bf272a4f1ec0.zip | |
util: replace qemu_get_local_state_pathname()
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 <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220420132624.2439741-39-marcandre.lureau@redhat.com>
Diffstat (limited to 'util/oslib-posix.c')
| -rw-r--r-- | util/oslib-posix.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c index bcb35c3c82..b8bf7d4070 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -297,12 +297,9 @@ int qemu_pipe(int pipefd[2]) } char * -qemu_get_local_state_pathname(const char *relative_pathname) +qemu_get_local_state_dir(void) { - g_autofree char *dir = g_strdup_printf("%s/%s", - CONFIG_QEMU_LOCALSTATEDIR, - relative_pathname); - return get_relocated_path(dir); + return get_relocated_path(CONFIG_QEMU_LOCALSTATEDIR); } void qemu_set_tty_echo(int fd, bool echo) |