diff options
author | Paolo Bonzini | 2020-10-28 12:36:57 +0100 |
---|---|---|
committer | Paolo Bonzini | 2020-12-10 18:15:18 +0100 |
commit | 2c65db5e58d2c74921077f6c064ba4c91ebde16a (patch) | |
tree | 2f17d8e6b60cbb621521f2d534dc851e069fd31b /include/qemu | |
parent | hmp: introduce cmd_available (diff) | |
download | qemu-2c65db5e58d2c74921077f6c064ba4c91ebde16a.tar.gz qemu-2c65db5e58d2c74921077f6c064ba4c91ebde16a.tar.xz qemu-2c65db5e58d2c74921077f6c064ba4c91ebde16a.zip |
vl: extract softmmu/datadir.c
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/datadir.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/qemu/datadir.h b/include/qemu/datadir.h new file mode 100644 index 0000000000..21f9097f58 --- /dev/null +++ b/include/qemu/datadir.h @@ -0,0 +1,28 @@ +#ifndef QEMU_DATADIR_H +#define QEMU_DATADIR_H + +#define QEMU_FILE_TYPE_BIOS 0 +#define QEMU_FILE_TYPE_KEYMAP 1 +/** + * qemu_find_file: + * @type: QEMU_FILE_TYPE_BIOS (for BIOS, VGA BIOS) + * or QEMU_FILE_TYPE_KEYMAP (for keymaps). + * @name: Relative or absolute file name + * + * If @name exists on disk as an absolute path, or a path relative + * to the current directory, then returns @name unchanged. + * Otherwise searches for @name file in the data directories, either + * configured at build time (DATADIR) or registered with the -L command + * line option. + * + * The caller must use g_free() to free the returned data when it is + * no longer required. + * + * Returns: a path that can access @name, or NULL if no matching file exists. + */ +char *qemu_find_file(int type, const char *name); +void qemu_add_default_firmwarepath(void); +void qemu_add_data_dir(char *path); +void qemu_list_data_dirs(void); + +#endif |