summaryrefslogtreecommitdiff
path: root/libusb/libusbi.h
diff options
context:
space:
mode:
authorNathan Hjelm <hjelmn@google.com>2023-04-03 09:55:25 -0600
committerNathan Hjelm <hjelmn@google.com>2023-04-12 13:02:35 -0600
commit84ac0b0f60323fab7ae765b2119df6149968b6e2 (patch)
tree9040b7f5c36987fc3c59c1ef40c55c5839e9dc16 /libusb/libusbi.h
parentfcf0c710ef5911ae37fbbf1b39d48a89f6f14e8a (diff)
downloadlibusb-84ac0b0f60323fab7ae765b2119df6149968b6e2.tar.gz
Add support for setting the log callback with libusb_set_option/libusb_init_context
This commit effectively deprecates libusb_set_log_cb by adding support for setting the callback in either libusb_set_option or libusb_init_context. Since the libusb_set_log_cb is already in use we can not easily deprecate it without first incrementing the major version. We may do that in the future. Closes #1265 Signed-off-by: Nathan Hjelm <hjelmn@google.com>
Diffstat (limited to 'libusb/libusbi.h')
-rw-r--r--libusb/libusbi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libusb/libusbi.h b/libusb/libusbi.h
index 72d2568..030e6b6 100644
--- a/libusb/libusbi.h
+++ b/libusb/libusbi.h
@@ -814,6 +814,7 @@ struct usbi_option {
int is_set;
union {
int ival;
+ libusb_log_cb log_cbval;
} arg;
};