qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PATCH v3 01/10] chardev/char-fe: Improve @docstrings
Date: Wed, 12 Nov 2025 13:58:59 +0000	[thread overview]
Message-ID: <aRSSo9Pxe7c9-ZAh@redhat.com> (raw)
In-Reply-To: <20251112134143.27194-2-philmd@linaro.org>

On Wed, Nov 12, 2025 at 02:41:34PM +0100, Philippe Mathieu-Daudé wrote:
> Describe the @c (this is the *frontend*) and @s (the *backend*)
> parameters. Fill qemu_chr_fe_[gs]et_msgfds() method docstrings.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  include/chardev/char-fe.h | 24 +++++++++++++++++++++++-
>  1 file changed, 23 insertions(+), 1 deletion(-)
> 
> diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h
> index 5f8a6df17dc..36bcf1f88a6 100644
> --- a/include/chardev/char-fe.h
> +++ b/include/chardev/char-fe.h

>  
>  /**
>   * qemu_chr_fe_get_msgfd:
> + * @c: the character frontend to access
>   *
>   * For backends capable of fd passing, return the latest file descriptor passed
>   * by a client.
> @@ -286,9 +302,12 @@ int qemu_chr_fe_get_msgfd(CharFrontend *c);

We should note here that if there is more than 1 pending FD,
all except the first pending FD will be closed

>  
>  /**
>   * qemu_chr_fe_get_msgfds:
> + * @c: the character frontend
> + * @fds: an array of ancillary file descriptors to get
> + * @num: the maximum number of ancillary file descriptors to get in @fds
>   *
>   * For backends capable of fd passing, return the number of file received
> - * descriptors and fills the fds array up to num elements
> + * descriptors and fills the fds array up to @num elements

Here we should note that if there are more pending FDs than @num,
then all further FDs will be closed.

>   *
>   * Returns: -1 if fd passing isn't supported or there are no pending file
>   *          descriptors.  If file descriptors are returned, subsequent calls to

Those are minor changes, so consider this tohave

  Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2025-11-12 14:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 13:41 [PATCH v3 00/10] chardev: Improve @docstring and clarify qemu_chr_write() uses Philippe Mathieu-Daudé
2025-11-12 13:41 ` [PATCH v3 01/10] chardev/char-fe: Improve @docstrings Philippe Mathieu-Daudé
2025-11-12 13:58   ` Daniel P. Berrangé [this message]
2025-11-13 11:31   ` Marc-André Lureau
2025-11-12 13:41 ` [PATCH v3 02/10] chardev/char-io: Add @docstrings for io_channel_send[_full]() Philippe Mathieu-Daudé
2025-11-13 11:32   ` Marc-André Lureau
2025-11-12 13:41 ` [PATCH v3 03/10] chardev/char: Improve ChardevClass::chr_write() docstring Philippe Mathieu-Daudé
2025-11-12 13:41 ` [PATCH v3 04/10] chardev/char: Document qemu_chr_write[_all]() Philippe Mathieu-Daudé
2025-11-12 13:41 ` [PATCH v3 05/10] chardev/char-pty: Do not ignore chr_write() failures Philippe Mathieu-Daudé
2025-11-12 13:41 ` [PATCH v3 06/10] chardev/char: Allow partial writes in qemu_chr_write() Philippe Mathieu-Daudé
2025-11-13 11:30   ` Marc-André Lureau
2025-11-12 13:41 ` [PATCH v3 07/10] chardev/char: Preserve %errno " Philippe Mathieu-Daudé
2025-11-12 13:41 ` [PATCH v3 08/10] chardev/char: Document qemu_chr_fe_write()'s return value Philippe Mathieu-Daudé
2025-11-13 11:32   ` Marc-André Lureau
2025-11-12 13:41 ` [PATCH v3 09/10] hw/char: Simplify when qemu_chr_fe_write() could not write Philippe Mathieu-Daudé
2025-11-12 13:41 ` [PATCH v3 10/10] system/replay: Rename some method parameters Philippe Mathieu-Daudé
2025-11-12 13:44 ` [PATCH v3 00/10] chardev: Improve @docstring and clarify qemu_chr_write() uses Philippe Mathieu-Daudé

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=aRSSo9Pxe7c9-ZAh@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.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 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).