On 1/19/26 5:18 AM, Florian Hofhammer wrote:
The qemu_plugin_{read,write} register API previously was inconsistent
with regard to its docstring (where a return value of both -1 and 0
would indicate an error) and to the memory read/write APIs, which
already return a boolean value to indicate success or failure.
Returning the number of bytes read or written is superfluous, as the
GByteArray* passed to the API functions already encodes the length.
See the linked thread for more details.

This patch moves from returning an int (number of bytes read/written) to
returning a bool from the register read/write API, bumps the plugin API
version, and adjusts plugins and tests accordingly.

Link: 
https://lore.kernel.org/qemu-devel/[email protected]/
Signed-off-by: Florian Hofhammer <[email protected]>
---
  contrib/plugins/execlog.c  | 14 ++++++++------
  contrib/plugins/uftrace.c  |  8 ++++----
  include/qemu/qemu-plugin.h | 19 +++++++++++--------
  plugins/api.c              | 15 ++++++++-------
  tests/tcg/plugins/insn.c   |  4 ++--
  5 files changed, 33 insertions(+), 27 deletions(-)


Thank you for the very quick patch Florian, looks great!

Reviewed-by: Pierrick Bouvier <[email protected]>

Reply via email to