mirror of
https://github.com/mborgerson/xemu.git
synced 2025-12-01 16:10:01 +00:00
util: Split out exec_dir from os_find_datadir
With this change, main() calls qemu_init_exec_dir and uses argv[0] to init exec_dir. The saved value can be retrieved with qemu_get_exec_dir later. It will be reused by module loading. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@ -215,6 +215,15 @@ bool fips_get_state(void);
|
||||
*/
|
||||
char *qemu_get_local_state_pathname(const char *relative_pathname);
|
||||
|
||||
/* 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.
|
||||
* Caller needs to release the returned string by g_free() */
|
||||
char *qemu_get_exec_dir(void);
|
||||
|
||||
/**
|
||||
* qemu_getauxval:
|
||||
* @type: the auxiliary vector key to lookup
|
||||
|
||||
Reference in New Issue
Block a user