Skip to content

Commit 5502a2d

Browse files
committed
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 <[email protected]>
1 parent fc5b671 commit 5502a2d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

iio.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,11 @@ __api __check_ret struct iio_context * iio_create_context_from_uri(const char *u
435435
/** @brief Duplicate a pre-existing IIO context
436436
* @param ctx A pointer to an iio_context structure
437437
* @return On success, A pointer to an iio_context structure
438-
* @return On failure, NULL is returned and errno is set appropriately */
438+
* @return On failure, NULL is returned and errno is set appropriately
439+
*
440+
* <b>NOTE:</b> This function is not supported on 'usb:' contexts, since libusb
441+
* can only claim the interface once. "Function not implemented" is the expected errno.
442+
* Any context which is cloned, must be destroyed via calling iio_context_destroy() */
439443
__api __check_ret struct iio_context * iio_context_clone(const struct iio_context *ctx);
440444

441445

0 commit comments

Comments
 (0)