qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] hw/block/block.c: improve confusing error
@ 2024-01-23  8:09 Manos Pitsidianakis
  2024-01-23  8:09 ` [PATCH 1/2] hw/core/qdev.c: add qdev_get_human_name() Manos Pitsidianakis
  2024-01-23  8:09 ` [PATCH 2/2] hw/block/block.c: improve confusing blk_check_size_and_read_all() error Manos Pitsidianakis
  0 siblings, 2 replies; 7+ messages in thread
From: Manos Pitsidianakis @ 2024-01-23  8:09 UTC (permalink / raw)
  To: qemu-devel, qemu-block

In cases where a device tries to read more bytes than the block device 
contains with the blk_check_size_and_read_all() function, the error is 
vague: "device requires X bytes, block backend provides Y bytes".

This patch changes the errors of this function to include the block
backend name, the device id and device type name where appropriate.

Manos Pitsidianakis (2):
  hw/core/qdev.c: add qdev_get_human_name()
  hw/block/block.c: improve confusing blk_check_size_and_read_all()
    error

 hw/block/block.c         | 25 +++++++++++++++----------
 hw/block/m25p80.c        |  3 ++-
 hw/block/pflash_cfi01.c  |  4 ++--
 hw/block/pflash_cfi02.c  |  2 +-
 hw/core/qdev.c           | 10 ++++++++++
 include/hw/block/block.h |  4 ++--
 include/hw/qdev-core.h   | 15 +++++++++++++++
 7 files changed, 47 insertions(+), 16 deletions(-)


base-commit: 09be34717190c1620f0c6e5c8765b8da354aeb4b
-- 
γαῖα πυρί μιχθήτω



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-23  8:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-23  8:09 [PATCH 0/2] hw/block/block.c: improve confusing error Manos Pitsidianakis
2024-01-23  8:09 ` [PATCH 1/2] hw/core/qdev.c: add qdev_get_human_name() Manos Pitsidianakis
2024-01-23  8:13   ` Philippe Mathieu-Daudé
2024-01-23  8:15     ` Manos Pitsidianakis
2024-01-23  8:23       ` Philippe Mathieu-Daudé
2024-01-23  8:09 ` [PATCH 2/2] hw/block/block.c: improve confusing blk_check_size_and_read_all() error Manos Pitsidianakis
2024-01-23  8:12   ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).