mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
fw_cfg: Dumb down fw_cfg_add_*() not to return success / failure
No caller is checking the value, so all errors get ignored, usually silently. assert() instead. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
f6e3534327
commit
4cad3867b6
2 changed files with 24 additions and 35 deletions
16
hw/fw_cfg.h
16
hw/fw_cfg.h
|
@ -54,14 +54,14 @@ typedef struct FWCfgFiles {
|
|||
typedef void (*FWCfgCallback)(void *opaque, uint8_t *data);
|
||||
|
||||
typedef struct FWCfgState FWCfgState;
|
||||
int fw_cfg_add_bytes(FWCfgState *s, uint16_t key, uint8_t *data, uint32_t len);
|
||||
int fw_cfg_add_i16(FWCfgState *s, uint16_t key, uint16_t value);
|
||||
int fw_cfg_add_i32(FWCfgState *s, uint16_t key, uint32_t value);
|
||||
int fw_cfg_add_i64(FWCfgState *s, uint16_t key, uint64_t value);
|
||||
int fw_cfg_add_callback(FWCfgState *s, uint16_t key, FWCfgCallback callback,
|
||||
void *callback_opaque, uint8_t *data, size_t len);
|
||||
int fw_cfg_add_file(FWCfgState *s, const char *filename, uint8_t *data,
|
||||
uint32_t len);
|
||||
void fw_cfg_add_bytes(FWCfgState *s, uint16_t key, uint8_t *data, uint32_t len);
|
||||
void fw_cfg_add_i16(FWCfgState *s, uint16_t key, uint16_t value);
|
||||
void fw_cfg_add_i32(FWCfgState *s, uint16_t key, uint32_t value);
|
||||
void fw_cfg_add_i64(FWCfgState *s, uint16_t key, uint64_t value);
|
||||
void fw_cfg_add_callback(FWCfgState *s, uint16_t key, FWCfgCallback callback,
|
||||
void *callback_opaque, uint8_t *data, size_t len);
|
||||
void fw_cfg_add_file(FWCfgState *s, const char *filename, uint8_t *data,
|
||||
uint32_t len);
|
||||
FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,
|
||||
hwaddr crl_addr, hwaddr data_addr);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue