From 5502a2d605f5b6ddf73bf82e79b0651ec5e0a731 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Tue, 16 Jun 2020 16:57:07 -0400 Subject: [PATCH] iio.h: add some doc about iio_context_clone not working on usb Which (as of today) is expected, but not documented. Signed-off-by: Robin Getz --- iio.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/iio.h b/iio.h index 78fa2cadb..641b4d501 100644 --- a/iio.h +++ b/iio.h @@ -435,7 +435,11 @@ __api __check_ret struct iio_context * iio_create_context_from_uri(const char *u /** @brief Duplicate a pre-existing IIO context * @param ctx A pointer to an iio_context structure * @return On success, A pointer to an iio_context structure - * @return On failure, NULL is returned and errno is set appropriately */ + * @return On failure, NULL is returned and errno is set appropriately + * + * NOTE: This function is not supported on 'usb:' contexts, since libusb + * can only claim the interface once. "Function not implemented" is the expected errno. + * Any context which is cloned, must be destroyed via calling iio_context_destroy() */ __api __check_ret struct iio_context * iio_context_clone(const struct iio_context *ctx);