examples: Replace deprecated fp_set_debug()

This commit is contained in:
Bastien Nocera 2018-05-24 12:42:47 +02:00
parent eb8f7ba3b2
commit 15afe43cf0
5 changed files with 15 additions and 5 deletions

View file

@ -110,12 +110,14 @@ int main(void)
"Ctrl+C\n"); "Ctrl+C\n");
getchar(); getchar();
setenv ("G_MESSAGES_DEBUG", "all", 0);
setenv ("LIBUSB_DEBUG", "3", 0);
r = fp_init(); r = fp_init();
if (r < 0) { if (r < 0) {
fprintf(stderr, "Failed to initialize libfprint\n"); fprintf(stderr, "Failed to initialize libfprint\n");
exit(1); exit(1);
} }
fp_set_debug(3);
discovered_devs = fp_discover_devs(); discovered_devs = fp_discover_devs();
if (!discovered_devs) { if (!discovered_devs) {

View file

@ -42,12 +42,14 @@ int main(void)
struct fp_dev *dev; struct fp_dev *dev;
struct fp_img *img = NULL; struct fp_img *img = NULL;
setenv ("G_MESSAGES_DEBUG", "all", 0);
setenv ("LIBUSB_DEBUG", "3", 0);
r = fp_init(); r = fp_init();
if (r < 0) { if (r < 0) {
fprintf(stderr, "Failed to initialize libfprint\n"); fprintf(stderr, "Failed to initialize libfprint\n");
exit(1); exit(1);
} }
fp_set_debug(3);
discovered_devs = fp_discover_devs(); discovered_devs = fp_discover_devs();
if (!discovered_devs) { if (!discovered_devs) {

View file

@ -141,12 +141,14 @@ int main(void)
int img_height; int img_height;
int standardize = 0; int standardize = 0;
setenv ("G_MESSAGES_DEBUG", "all", 0);
setenv ("LIBUSB_DEBUG", "3", 0);
r = fp_init(); r = fp_init();
if (r < 0) { if (r < 0) {
fprintf(stderr, "Failed to initialize libfprint\n"); fprintf(stderr, "Failed to initialize libfprint\n");
exit(1); exit(1);
} }
fp_set_debug(3);
discovered_devs = fp_discover_devs(); discovered_devs = fp_discover_devs();
if (!discovered_devs) { if (!discovered_devs) {

View file

@ -86,12 +86,14 @@ int main(void)
struct fp_dev *dev; struct fp_dev *dev;
struct fp_print_data *data; struct fp_print_data *data;
setenv ("G_MESSAGES_DEBUG", "all", 0);
setenv ("LIBUSB_DEBUG", "3", 0);
r = fp_init(); r = fp_init();
if (r < 0) { if (r < 0) {
fprintf(stderr, "Failed to initialize libfprint\n"); fprintf(stderr, "Failed to initialize libfprint\n");
exit(1); exit(1);
} }
fp_set_debug(3);
discovered_devs = fp_discover_devs(); discovered_devs = fp_discover_devs();
if (!discovered_devs) { if (!discovered_devs) {

View file

@ -129,12 +129,14 @@ int main(void)
struct fp_dev *dev; struct fp_dev *dev;
struct fp_print_data *data; struct fp_print_data *data;
setenv ("G_MESSAGES_DEBUG", "all", 0);
setenv ("LIBUSB_DEBUG", "3", 0);
r = fp_init(); r = fp_init();
if (r < 0) { if (r < 0) {
fprintf(stderr, "Failed to initialize libfprint\n"); fprintf(stderr, "Failed to initialize libfprint\n");
exit(1); exit(1);
} }
fp_set_debug(3);
discovered_devs = fp_discover_devs(); discovered_devs = fp_discover_devs();
if (!discovered_devs) { if (!discovered_devs) {