summaryrefslogtreecommitdiff
path: root/examples/fxload.c
diff options
context:
space:
mode:
authorNathan Hjelm <hjelmn@me.com>2021-12-31 10:21:38 -0700
committerTormod Volden <debian.tormod@gmail.com>2023-01-20 11:04:14 +0100
commit3c33e499a051562a4bafaeb38a79089351c94381 (patch)
treeb1108eef39580285610b501bef433fe42dfee46c /examples/fxload.c
parent6622f386f52807dac76c8a260c98aa02c311bc93 (diff)
downloadlibusb-3c33e499a051562a4bafaeb38a79089351c94381.tar.gz
Update tests and example to use the new libusb_init_context() function
This commit updates all test and example code to use the newer libusb_init_context() function instead of libusb_init(). Signed-off-by: Nathan Hjelm <hjelmn@google.com> [Tormod: Update umockdev.c as well] Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Diffstat (limited to 'examples/fxload.c')
-rw-r--r--examples/fxload.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/fxload.c b/examples/fxload.c
index 541c3d3..2526083 100644
--- a/examples/fxload.c
+++ b/examples/fxload.c
@@ -172,9 +172,9 @@ int main(int argc, char*argv[])
}
/* open the device using libusb */
- status = libusb_init(NULL);
+ status = libusb_init_context(/*ctx=*/NULL, /*options=*/NULL, /*num_options=*/0);
if (status < 0) {
- logerror("libusb_init() failed: %s\n", libusb_error_name(status));
+ logerror("libusb_init_context() failed: %s\n", libusb_error_name(status));
return -1;
}
libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL, verbose);