[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/28] chardev/char-fe: Document returned value on error
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 20/28] chardev/char-fe: Document returned value on error |
Date: |
Tue, 23 Jul 2024 22:38:47 +0200 |
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>
---
include/chardev/char-fe.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h
index ecef1828355..3310449eaf0 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);
--
2.41.0
- [PULL 10/28] hw/i2c/mpc_i2c: Fix mmio region size, (continued)
- [PULL 10/28] hw/i2c/mpc_i2c: Fix mmio region size, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 11/28] hw/mips/loongson3_virt: remove useless type cast, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 12/28] util/range: Make ranges_overlap() return bool, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 15/28] system/memory_mapping: make range overlap check more readable, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 14/28] sparc/ldst_helper: make range overlap check more readable, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 13/28] cxl/mailbox: make range overlap check more readable, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 16/28] crypto/block-luks: make range overlap check more readable, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 18/28] hw/nubus/virtio-mmio: Fix missing ERRP_GUARD() in realize handler, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 19/28] hw/char/goldfish: Use DMA memory API, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 17/28] dump: make range overlap check more readable, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 20/28] chardev/char-fe: Document returned value on error,
Philippe Mathieu-Daudé <=
- [PULL 21/28] util/fifo8: Fix style, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 22/28] util/fifo8: Use fifo8_reset() in fifo8_create(), Philippe Mathieu-Daudé, 2024/07/23
- [PULL 23/28] util/fifo8: Rename fifo8_peek_buf() -> fifo8_peek_bufptr(), Philippe Mathieu-Daudé, 2024/07/23
- [PULL 24/28] util/fifo8: Rename fifo8_pop_buf() -> fifo8_pop_bufptr(), Philippe Mathieu-Daudé, 2024/07/23
- [PULL 25/28] util/fifo8: Expose fifo8_pop_buf(), Philippe Mathieu-Daudé, 2024/07/23
- [PULL 27/28] MAINTAINERS: Cover guest-agent in QAPI schema, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 28/28] MAINTAINERS: Add myself as a reviewer of machine core, Philippe Mathieu-Daudé, 2024/07/23
- [PULL 26/28] util/fifo8: Introduce fifo8_drop(), Philippe Mathieu-Daudé, 2024/07/23
- Re: [PULL 00/28] Misc HW+ patches for 2024-07-23, Richard Henderson, 2024/07/24