mbox series

[XEN,v3,0/3] libxl: Fixes for libxl_xenconsole_readline()

Message ID cover.1725294334.git.javi.merino@cloud.com (mailing list archive)
Headers show
Series libxl: Fixes for libxl_xenconsole_readline() | expand

Message

Javi Merino Sept. 2, 2024, 4:38 p.m. UTC
Fix nul-termination of the return value of
libxl_xen_console_read_line().  While at it, remove unneeded memset()s
to the buffer and improve the documentation of the function.

Changes since v2[0]:
  - Fixed comment format as suggested by Anthony
  - Clarified that 16384 is the default size of xen's console buffer.
  - Fixed `libxl_xen_console_read_line()` documentation as suggested by Alejandro and Andrew.
  - line_r -> buff in `tools/include/libxl.h` as well.

Changes since v1[1]:
  - Add Fixes: line to the first patch
  - Remove cr->count from the struct and make it a local variable in
    libxl_xen_console_read_line()
  - Improve the documentation of libxl_xen_console_read_line()

[0] https://lore.kernel.org/xen-devel/cover.1724430173.git.javi.merino@cloud.com/
[1] https://lore.kernel.org/xen-devel/ad7c89bbae34155566ae7c9ca2cb501f21c7d585.1724330921.git.javi.merino@cloud.com/

Javi Merino (3):
  libxl: Fix nul-termination of the return value of
    libxl_xen_console_read_line()
  libxl: Remove unnecessary buffer zeroing and zalloc()
  libxl: Update the documentation of libxl_xen_console_read_line()

 tools/include/libxl.h             |  2 +-
 tools/libs/light/libxl_console.c  | 52 +++++++++++++++++++++----------
 tools/libs/light/libxl_internal.h |  1 -
 3 files changed, 36 insertions(+), 19 deletions(-)