mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
fw_cfg: Use void *, size_t instead of uint8_t *, uint32_t for blobs
Many callers pass size_t, which gets silently truncated to uint32_t. Harmless, because all practical sizes are well below 4GiB. Clean it up anyway. Size overflow now fails assertions. Bonus: saves a whole bunch of silly casts. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
b3dd15529d
commit
089da572b9
4 changed files with 27 additions and 27 deletions
|
@ -172,7 +172,7 @@ fw_cfg_write(void *s, uint8_t value) "%p %d"
|
|||
fw_cfg_select(void *s, uint16_t key, int ret) "%p key %d = %d"
|
||||
fw_cfg_read(void *s, uint8_t ret) "%p = %d"
|
||||
fw_cfg_add_file_dupe(void *s, char *name) "%p %s"
|
||||
fw_cfg_add_file(void *s, int index, char *name, uint32_t len) "%p #%d: %s (%d bytes)"
|
||||
fw_cfg_add_file(void *s, int index, char *name, size_t len) "%p #%d: %s (%zd bytes)"
|
||||
|
||||
# hw/hd-geometry.c
|
||||
hd_geometry_lchs_guess(void *bs, int cyls, int heads, int secs) "bs %p LCHS %d %d %d"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue