From: "Alejandro Vallejo" <alejandro.vallejo@cloud.com>
To: "Javi Merino" <javi.merino@cloud.com>, <xen-devel@lists.xenproject.org>
Cc: <jbeulich@suse.com>, <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Juergen Gross" <jgross@suse.com>
Subject: Re: [XEN PATCH v2 3/3] libxl: Update the documentation of libxl_xen_console_read_line()
Date: Mon, 02 Sep 2024 11:14:11 +0100 [thread overview]
Message-ID: <D3VPWEPD5J31.W6GFDD7ESFYW@cloud.com> (raw)
In-Reply-To: <d868579d9ea98d8072630f5b85f7f7250ece393d.1724430173.git.javi.merino@cloud.com>
On Fri Aug 23, 2024 at 6:05 PM BST, Javi Merino wrote:
> Despite its name, libxl_xen_console_read_line() does not read a line,
> it fills the buffer with as many characters as fit. Update the
> documentation to reflect the real behaviour of the function. Rename
> line_r to avoid confusion since it is a pointer to an array of
> characters.
>
> Signed-off-by: Javi Merino <javi.merino@cloud.com>
> ---
> tools/libs/light/libxl_console.c | 22 ++++++++++++----------
> 1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/tools/libs/light/libxl_console.c b/tools/libs/light/libxl_console.c
> index f42f6a51ee6f..652897e4ef6d 100644
> --- a/tools/libs/light/libxl_console.c
> +++ b/tools/libs/light/libxl_console.c
> @@ -789,17 +789,19 @@ libxl_xen_console_reader *
> return cr;
> }
>
> -/* return values: *line_r
> - * 1 success, whole line obtained from buffer non-0
> - * 0 no more lines available right now 0
> - * negative error code ERROR_* 0
> - * On success *line_r is updated to point to a nul-terminated
> +/* Copy part of the console ring into a buffer
> + *
> + * Return values:
> + * 1: Success, the buffer obtained from the console ring an
Seems like this line in the comment is incomplete?
> + * 0: No more lines available right now
> + * -ERROR_* on error
> + *
> + * On success, *line_r is updated to point to a nul-terminated
> * string which is valid until the next call on the same console
> - * reader. The libxl caller may overwrite parts of the string
> - * if it wishes. */
> + * reader. */
Cheers,
Alejandro
next prev parent reply other threads:[~2024-09-02 10:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-23 17:05 [XEN PATCH v2 0/3] libxl: Fixes for libxl_xenconsole_readline() Javi Merino
2024-08-23 17:05 ` [XEN PATCH v2 1/3] libxl: Fix nul-termination of the return value of libxl_xen_console_read_line() Javi Merino
2024-08-27 15:20 ` Anthony PERARD
2024-09-02 14:55 ` Javi Merino
2024-08-29 15:53 ` Roger Pau Monné
2024-08-30 19:22 ` Andrew Cooper
2024-09-02 7:50 ` Roger Pau Monné
2024-09-02 15:03 ` Javi Merino
2024-08-23 17:05 ` [XEN PATCH v2 2/3] libxl: Remove unnecessary buffer zeroing and zalloc() Javi Merino
2024-08-27 15:21 ` Anthony PERARD
2024-08-23 17:05 ` [XEN PATCH v2 3/3] libxl: Update the documentation of libxl_xen_console_read_line() Javi Merino
2024-08-23 17:31 ` Andrew Cooper
2024-09-02 16:16 ` Javi Merino
2024-08-27 15:26 ` Anthony PERARD
2024-09-02 16:19 ` Javi Merino
2024-09-02 10:14 ` Alejandro Vallejo [this message]
2024-09-02 15:08 ` Javi Merino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D3VPWEPD5J31.W6GFDD7ESFYW@cloud.com \
--to=alejandro.vallejo@cloud.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=javi.merino@cloud.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.