mbox series

[v2,0/2] xen: error handling and FreeBSD compatibility fixes

Message ID 20250110093531.23221-1-roger.pau@citrix.com (mailing list archive)
Headers show
Series xen: error handling and FreeBSD compatibility fixes | expand

Message

Roger Pau Monné Jan. 10, 2025, 9:35 a.m. UTC
Hello,

First patch from David introduces a new helper to fetch xenstore nodes,
while second patch removes the usage of scanf related functions with the
"%ms" format specifier, as it's not supported by the FreeBSD scanf libc
implementation.

Thanks, Roger.

David Woodhouse (1):
  hw/xen: Add xs_node_read() helper function

Roger Pau Monné (1):
  xen: do not use '%ms' scanf specifier

 hw/block/xen-block.c            |  3 ++-
 hw/char/xen_console.c           | 14 ++++++++------
 hw/xen/trace-events             |  1 +
 hw/xen/xen-bus-helper.c         | 22 ++++++++++++++++++++++
 hw/xen/xen-bus.c                | 14 ++++++++++++--
 include/hw/xen/xen-bus-helper.h |  4 ++++
 include/hw/xen/xen-bus.h        |  1 +
 7 files changed, 50 insertions(+), 9 deletions(-)

Comments

David Woodhouse Jan. 10, 2025, 10:02 a.m. UTC | #1
On Fri, 2025-01-10 at 10:35 +0100, Roger Pau Monne wrote:
> Hello,
> 
> First patch from David introduces a new helper to fetch xenstore nodes,
> while second patch removes the usage of scanf related functions with the
> "%ms" format specifier, as it's not supported by the FreeBSD scanf libc
> implementation.
> 
> Thanks, Roger.

Thanks. I've got a handful of non-bugfix cleanups to use the new
xs_node_read in my tree at
https://git.infradead.org/users/dwmw2/qemu.git/shortlog/refs/heads/xs_node_read

David Woodhouse (4):
      hw/xen: Use xs_node_read() from xs_node_vscanf()
      hw/xen: Use xs_node_read() from xen_console_get_name()
      hw/xen: Use xs_node_read() from xen_netdev_get_name()
      hw/xen: Use xs_node_read() from xenstore_read_str() instead of open-coding it

I'm slightly dubious about the last one; xen_pvdev.c didn't previously
use anything from xen-bus-helper.c and even hardcodes zero for
XBT_NULL. And I look at the way it deliberately reallocates the string,
and wonder if we should be doing that in qemu_xen_xs_read() for the
true Xen case. And does it even matter anywhere except Windows?