mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
vl: relocate paths to data directories
As an additional advantage, the logic is now unified between POSIX and Win32 systems. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
20
os-posix.c
20
os-posix.c
@ -80,26 +80,6 @@ void os_setup_signal_handling(void)
|
||||
sigaction(SIGTERM, &act, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Find a likely location for support files using the location of the binary.
|
||||
* When running from the build tree this will be "$bindir/pc-bios".
|
||||
* Otherwise, this is CONFIG_QEMU_DATADIR.
|
||||
*
|
||||
* The caller must use g_free() to free the returned data when it is
|
||||
* no longer required.
|
||||
*/
|
||||
char *os_find_datadir(void)
|
||||
{
|
||||
g_autofree char *dir = NULL;
|
||||
|
||||
dir = g_build_filename(qemu_get_exec_dir(), "pc-bios", NULL);
|
||||
if (g_file_test(dir, G_FILE_TEST_IS_DIR)) {
|
||||
return g_steal_pointer(&dir);
|
||||
}
|
||||
|
||||
return g_strdup(CONFIG_QEMU_DATADIR);
|
||||
}
|
||||
|
||||
void os_set_proc_name(const char *s)
|
||||
{
|
||||
#if defined(PR_SET_NAME)
|
||||
|
Reference in New Issue
Block a user