diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-11-10 06:49:35 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-07-23 22:34:54 +0200 |
commit | b07f07761d85c97d478d9df3978fcd32f8fbb163 (patch) | |
tree | c61dccc844809e487940a73ae6475670ee04e7d6 | |
parent | c9e0b9a59ce6499c32affad6415560b1ad1d708f (diff) | |
download | qemu-b07f07761d85c97d478d9df3978fcd32f8fbb163.zip qemu-b07f07761d85c97d478d9df3978fcd32f8fbb163.tar.gz qemu-b07f07761d85c97d478d9df3978fcd32f8fbb163.tar.bz2 |
chardev/char-fe: Document returned value on error
qemu_chr_fe_add_watch() and qemu_chr_fe_write[_all]()
return -1 on error. Mention it in the documentation.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20240722160745.67904-2-philmd@linaro.org>
-rw-r--r-- | include/chardev/char-fe.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h index ecef182..3310449 100644 --- a/include/chardev/char-fe.h +++ b/include/chardev/char-fe.h @@ -228,6 +228,7 @@ guint qemu_chr_fe_add_watch(CharBackend *be, GIOCondition cond, * is thread-safe. * * Returns: the number of bytes consumed (0 if no associated Chardev) + * or -1 on error. */ int qemu_chr_fe_write(CharBackend *be, const uint8_t *buf, int len); @@ -242,6 +243,7 @@ int qemu_chr_fe_write(CharBackend *be, const uint8_t *buf, int len); * attempted to be written. This function is thread-safe. * * Returns: the number of bytes consumed (0 if no associated Chardev) + * or -1 on error. */ int qemu_chr_fe_write_all(CharBackend *be, const uint8_t *buf, int len); @@ -253,6 +255,7 @@ int qemu_chr_fe_write_all(CharBackend *be, const uint8_t *buf, int len); * Read data to a buffer from the back end. * * Returns: the number of bytes read (0 if no associated Chardev) + * or -1 on error. */ int qemu_chr_fe_read_all(CharBackend *be, uint8_t *buf, int len); |