summary refs log tree commit diff stats
path: root/include/qemu-common.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-07-23 11:43:25 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-07-23 11:43:25 +0100
commit53ce7b47b5bf47db067b81c18c786ed7b792d031 (patch)
tree2468ce65d84da001ce25b3b68f4377de6b433912 /include/qemu-common.h
parentd0cc248164961a7ba9d43806feffd76f9f6d7f41 (diff)
parent5e29521a82e540552880c3572cb8274bcaa1002c (diff)
downloadfocaccia-qemu-53ce7b47b5bf47db067b81c18c786ed7b792d031.tar.gz
focaccia-qemu-53ce7b47b5bf47db067b81c18c786ed7b792d031.zip
Merge remote-tracking branch 'remotes/philmd-gitlab/tags/avr-20200721' into staging
AVR patches

Fixes a memory leak reported by Coverity (CID 1430449).

CI jobs result:
. https://gitlab.com/philmd/qemu/-/pipelines/168722631

# gpg: Signature made Tue 21 Jul 2020 19:00:03 BST
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* remotes/philmd-gitlab/tags/avr-20200721:
  hw/avr/boot: Fix memory leak in avr_load_firmware()
  qemu-common: Document qemu_find_file()
  qemu/osdep: Reword qemu_get_exec_dir() documentation
  qemu/osdep: Document os_find_datadir() return value

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/qemu-common.h')
-rw-r--r--include/qemu-common.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/qemu-common.h b/include/qemu-common.h
index d0142f29ac..bb9496bd80 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -110,6 +110,23 @@ const char *qemu_get_vm_name(void);
 
 #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);
 
 /* OS specific functions */