summaryrefslogtreecommitdiffstats
path: root/softmmu
diff options
context:
space:
mode:
authorAkihiko Odaki2022-06-24 17:40:42 +0200
committerPaolo Bonzini2022-07-13 16:58:57 +0200
commit8154f5e64b0cfb836803ec6c11360075be66cd00 (patch)
tree82ddedbd9cf376f0991ec2c73020628ff8e78223 /softmmu
parentmodule: Use bundle mechanism (diff)
downloadqemu-8154f5e64b0cfb836803ec6c11360075be66cd00.tar.gz
qemu-8154f5e64b0cfb836803ec6c11360075be66cd00.tar.xz
qemu-8154f5e64b0cfb836803ec6c11360075be66cd00.zip
meson: Prefix each element of firmware path
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20220624154042.51512-1-akihiko.odaki@gmail.com> [Rewrite shell function without using Bash extensions. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'softmmu')
-rw-r--r--softmmu/datadir.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/softmmu/datadir.c b/softmmu/datadir.c
index 697cffea93..c9237cb5d4 100644
--- a/softmmu/datadir.c
+++ b/softmmu/datadir.c
@@ -85,15 +85,17 @@ void qemu_add_data_dir(char *path)
void qemu_add_default_firmwarepath(void)
{
- char **dirs;
+ static const char * const dirs[] = {
+ CONFIG_QEMU_FIRMWAREPATH
+ NULL
+ };
+
size_t i;
/* add configured firmware directories */
- dirs = g_strsplit(CONFIG_QEMU_FIRMWAREPATH, G_SEARCHPATH_SEPARATOR_S, 0);
for (i = 0; dirs[i] != NULL; i++) {
qemu_add_data_dir(get_relocated_path(dirs[i]));
}
- g_strfreev(dirs);
/* try to find datadir relative to the executable path */
qemu_add_data_dir(get_relocated_path(CONFIG_QEMU_DATADIR));