From 15afe43cf0e6a73170f77d378e194cd87ca9b162 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 24 May 2018 12:42:47 +0200 Subject: [PATCH] examples: Replace deprecated fp_set_debug() --- examples/enroll.c | 4 +++- examples/img_capture.c | 4 +++- examples/img_capture_continuous.c | 4 +++- examples/verify.c | 4 +++- examples/verify_live.c | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/examples/enroll.c b/examples/enroll.c index f2ba9be..4eea39a 100644 --- a/examples/enroll.c +++ b/examples/enroll.c @@ -110,12 +110,14 @@ int main(void) "Ctrl+C\n"); getchar(); + setenv ("G_MESSAGES_DEBUG", "all", 0); + setenv ("LIBUSB_DEBUG", "3", 0); + r = fp_init(); if (r < 0) { fprintf(stderr, "Failed to initialize libfprint\n"); exit(1); } - fp_set_debug(3); discovered_devs = fp_discover_devs(); if (!discovered_devs) { diff --git a/examples/img_capture.c b/examples/img_capture.c index ba256df..c65c73d 100644 --- a/examples/img_capture.c +++ b/examples/img_capture.c @@ -42,12 +42,14 @@ int main(void) struct fp_dev *dev; struct fp_img *img = NULL; + setenv ("G_MESSAGES_DEBUG", "all", 0); + setenv ("LIBUSB_DEBUG", "3", 0); + r = fp_init(); if (r < 0) { fprintf(stderr, "Failed to initialize libfprint\n"); exit(1); } - fp_set_debug(3); discovered_devs = fp_discover_devs(); if (!discovered_devs) { diff --git a/examples/img_capture_continuous.c b/examples/img_capture_continuous.c index 94459b1..7dcb522 100644 --- a/examples/img_capture_continuous.c +++ b/examples/img_capture_continuous.c @@ -141,12 +141,14 @@ int main(void) int img_height; int standardize = 0; + setenv ("G_MESSAGES_DEBUG", "all", 0); + setenv ("LIBUSB_DEBUG", "3", 0); + r = fp_init(); if (r < 0) { fprintf(stderr, "Failed to initialize libfprint\n"); exit(1); } - fp_set_debug(3); discovered_devs = fp_discover_devs(); if (!discovered_devs) { diff --git a/examples/verify.c b/examples/verify.c index 60a2ccb..26566ed 100644 --- a/examples/verify.c +++ b/examples/verify.c @@ -86,12 +86,14 @@ int main(void) struct fp_dev *dev; struct fp_print_data *data; + setenv ("G_MESSAGES_DEBUG", "all", 0); + setenv ("LIBUSB_DEBUG", "3", 0); + r = fp_init(); if (r < 0) { fprintf(stderr, "Failed to initialize libfprint\n"); exit(1); } - fp_set_debug(3); discovered_devs = fp_discover_devs(); if (!discovered_devs) { diff --git a/examples/verify_live.c b/examples/verify_live.c index 27acb3b..82ec2ab 100644 --- a/examples/verify_live.c +++ b/examples/verify_live.c @@ -129,12 +129,14 @@ int main(void) struct fp_dev *dev; struct fp_print_data *data; + setenv ("G_MESSAGES_DEBUG", "all", 0); + setenv ("LIBUSB_DEBUG", "3", 0); + r = fp_init(); if (r < 0) { fprintf(stderr, "Failed to initialize libfprint\n"); exit(1); } - fp_set_debug(3); discovered_devs = fp_discover_devs(); if (!discovered_devs) {