diff options
author | Chris Dickens <christopher.a.dickens@gmail.com> | 2017-07-10 22:37:13 -0700 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2017-07-16 14:02:05 -0700 |
commit | 539f22e2fd916558d11ab9a66f10f461c5593168 (patch) | |
tree | 4f7dc78c39331fa92d201edf95cee1920dbe01d4 /tests | |
parent | 34987d005ec6a49cef89dde76513db34a4731bae (diff) | |
download | libusb-539f22e2fd916558d11ab9a66f10f461c5593168.tar.gz |
core: Introduce libusb_set_option() API function
This new function allows more flexibility in extending the library to
support more user-configurable options. It is intended to provide a
single API that can support a wide variety of needs and eliminates the
need for new API functions to set future options.
The function is introduced with a single option (LIBUSB_OPTION_LOG_LEVEL)
that replaces the libusb_set_debug() function. Documentation relating to
libusb_set_debug() and the uses of this function in the examples and
tests have been updated accordingly.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stress.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/stress.c b/tests/stress.c index 0f50003..0e2dbe5 100644 --- a/tests/stress.c +++ b/tests/stress.c @@ -126,8 +126,8 @@ static libusb_testlib_result test_default_context_change(libusb_testlib_ctx * tc } /* Enable debug output, to be sure to use the context */ - libusb_set_debug(NULL, LIBUSB_LOG_LEVEL_DEBUG); - libusb_set_debug(ctx, LIBUSB_LOG_LEVEL_DEBUG); + libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_DEBUG); + libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_DEBUG); /* Now create a reference to the default context */ r = libusb_init(NULL); |