aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/vl.c b/vl.c
index 19633423aa..3fed457921 100644
--- a/vl.c
+++ b/vl.c
@@ -3125,6 +3125,7 @@ int main(int argc, char **argv, char **envp)
Error *main_loop_err = NULL;
Error *err = NULL;
bool list_data_dirs = false;
+ char **dirs;
typedef struct BlockdevOptions_queue {
BlockdevOptions *bdo;
Location loc;
@@ -4309,11 +4310,16 @@ int main(int argc, char **argv, char **envp)
qemu_set_log(0);
}
- /* If no data_dir is specified then try to find it relative to the
- executable path. */
+ /* 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(dirs[i]);
+ }
+
+ /* try to find datadir relative to the executable path */
qemu_add_data_dir(os_find_datadir());
- /* If all else fails use the install path specified when building. */
+ /* add the datadir specified when building */
qemu_add_data_dir(CONFIG_QEMU_DATADIR);
/* -L help lists the data directories and exits. */