diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-05-25 16:41:26 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-05-28 11:42:56 +0200 |
commit | 06680b15b4ee3184b57c9c910886a9ff8a7e58c0 (patch) | |
tree | 627126d7b88d195950f785c3344f5d53cc0f1768 /include | |
parent | 2417cbd5916d043e0c56408221fbe9935d0bc8da (diff) | |
download | qemu-06680b15b4ee3184b57c9c910886a9ff8a7e58c0.zip qemu-06680b15b4ee3184b57c9c910886a9ff8a7e58c0.tar.gz qemu-06680b15b4ee3184b57c9c910886a9ff8a7e58c0.tar.bz2 |
include: move qemu_*_exec_dir() to cutils
The function is required by get_relocated_path() (already in cutils),
and used by qemu-ga and may be generally useful.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220525144140.591926-2-marcandre.lureau@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/cutils.h | 7 | ||||
-rw-r--r-- | include/qemu/osdep.h | 8 |
2 files changed, 7 insertions, 8 deletions
diff --git a/include/qemu/cutils.h b/include/qemu/cutils.h index 5c6572d..40e10e1 100644 --- a/include/qemu/cutils.h +++ b/include/qemu/cutils.h @@ -193,6 +193,13 @@ int uleb128_decode_small(const uint8_t *in, uint32_t *n); */ int qemu_pstrcmp0(const char **str1, const char **str2); +/* Find program directory, and save it for later usage with + * qemu_get_exec_dir(). + * Try OS specific API first, if not working, parse from argv0. */ +void qemu_init_exec_dir(const char *argv0); + +/* Get the saved exec dir. */ +const char *qemu_get_exec_dir(void); /** * get_relocated_path: diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index a72e99d..b1c161c 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -557,14 +557,6 @@ void qemu_set_cloexec(int fd); */ char *qemu_get_local_state_dir(void); -/* Find program directory, and save it for later usage with - * qemu_get_exec_dir(). - * Try OS specific API first, if not working, parse from argv0. */ -void qemu_init_exec_dir(const char *argv0); - -/* Get the saved exec dir. */ -const char *qemu_get_exec_dir(void); - /** * qemu_getauxval: * @type: the auxiliary vector key to lookup |