summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-07-22 12:42:25 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-07-22 12:42:25 +0100
commitd0cc248164961a7ba9d43806feffd76f9f6d7f41 (patch)
tree9073d60dc8b5572ca9610a6d050e9df7c20a20ef /include
parent3cbc8970f55c87cb58699b6dc8fe42998bc79dc0 (diff)
parent077195187b47d83418e5fb521c89d7881fab3049 (diff)
downloadqemu-d0cc248164961a7ba9d43806feffd76f9f6d7f41.zip
Merge remote-tracking branch 'remotes/philmd-gitlab/tags/fw_cfg-20200721' into staging
fw_cfg patches Fixes the DEADCODE issue reported by Coverity (CID 1430396). CI jobs result: . https://gitlab.com/philmd/qemu/-/pipelines/169086301 # gpg: Signature made Tue 21 Jul 2020 18:52:46 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/fw_cfg-20200721: hw/nvram/fw_cfg: Let fw_cfg_add_from_generator() return boolean value hw/nvram/fw_cfg: Simplify fw_cfg_add_from_generator() error propagation Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/hw/nvram/fw_cfg.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
index 11feae3177..f190c428e8 100644
--- a/include/hw/nvram/fw_cfg.h
+++ b/include/hw/nvram/fw_cfg.h
@@ -32,7 +32,9 @@ typedef struct FWCfgDataGeneratorClass {
* @obj: the object implementing this interface
* @errp: pointer to a NULL-initialized error object
*
- * Returns: reference to a byte array containing the data.
+ * Returns: reference to a byte array containing the data on success,
+ * or NULL on error.
+ *
* The caller should release the reference when no longer
* required.
*/
@@ -302,8 +304,10 @@ void *fw_cfg_modify_file(FWCfgState *s, const char *filename, void *data,
* will be used; also, a new entry will be added to the file directory
* structure residing at key value FW_CFG_FILE_DIR, containing the item name,
* data size, and assigned selector key value.
+ *
+ * Returns: %true on success, %false on error.
*/
-void fw_cfg_add_from_generator(FWCfgState *s, const char *filename,
+bool fw_cfg_add_from_generator(FWCfgState *s, const char *filename,
const char *gen_id, Error **errp);
FWCfgState *fw_cfg_init_io_dma(uint32_t iobase, uint32_t dma_iobase,