Blame SOURCES/0091-fpi-ssm-Improve-debugging-of-SSM-using-driver-infos.patch

73b847
From 49f9cbb5670565c7ddbc78768ff0ec14d99269eb Mon Sep 17 00:00:00 2001
73b847
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
73b847
Date: Wed, 4 Dec 2019 20:14:16 +0100
73b847
Subject: [PATCH 091/181] fpi-ssm: Improve debugging of SSM using driver infos
73b847
73b847
Always mention the driver that is triggering it
73b847
---
73b847
 libfprint/fpi-ssm.c | 16 +++++++++++-----
73b847
 1 file changed, 11 insertions(+), 5 deletions(-)
73b847
73b847
diff --git a/libfprint/fpi-ssm.c b/libfprint/fpi-ssm.c
73b847
index 96336e1..8b3e4bd 100644
73b847
--- a/libfprint/fpi-ssm.c
73b847
+++ b/libfprint/fpi-ssm.c
73b847
@@ -278,7 +278,8 @@ fpi_ssm_free (FpiSsm *machine)
73b847
 static void
73b847
 __ssm_call_handler (FpiSsm *machine)
73b847
 {
73b847
-  fp_dbg ("%s entering state %d", machine->name, machine->cur_state);
73b847
+  fp_dbg ("[%s] %s entering state %d", fp_device_get_driver (machine->dev),
73b847
+          machine->name, machine->cur_state);
73b847
   machine->handler (machine, machine->dev);
73b847
 }
73b847
 
73b847
@@ -356,9 +357,11 @@ fpi_ssm_mark_completed (FpiSsm *machine)
73b847
   machine->completed = TRUE;
73b847
 
73b847
   if (machine->error)
73b847
-    fp_dbg ("%s completed with error: %s", machine->name, machine->error->message);
73b847
+    fp_dbg ("[%s] %s completed with error: %s", fp_device_get_driver (machine->dev),
73b847
+            machine->name, machine->error->message);
73b847
   else
73b847
-    fp_dbg ("%s completed successfully", machine->name);
73b847
+    fp_dbg ("[%s] %s completed successfully", fp_device_get_driver (machine->dev),
73b847
+            machine->name);
73b847
   if (machine->callback)
73b847
     {
73b847
       GError *error = machine->error ? g_error_copy (machine->error) : NULL;
73b847
@@ -421,12 +424,15 @@ fpi_ssm_mark_failed (FpiSsm *machine, GError *error)
73b847
   g_assert (error);
73b847
   if (machine->error)
73b847
     {
73b847
-      fp_warn ("SSM already has an error set, ignoring new error %s", error->message);
73b847
+      fp_warn ("[%s] SSM %s already has an error set, ignoring new error %s",
73b847
+               fp_device_get_driver (machine->dev), machine->name, error->message);
73b847
       g_error_free (error);
73b847
       return;
73b847
     }
73b847
 
73b847
-  fp_dbg ("SSM failed in state %d with error: %s", machine->cur_state, error->message);
73b847
+  fp_dbg ("[%s] SSM %s failed in state %d with error: %s",
73b847
+          fp_device_get_driver (machine->dev), machine->name,
73b847
+          machine->cur_state, error->message);
73b847
   machine->error = g_steal_pointer (&error);
73b847
   fpi_ssm_mark_completed (machine);
73b847
 }
73b847
-- 
73b847
2.24.1
73b847