mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-09-09 04:40:06 +00:00
fpi-log: Use single-line hex bytes dump
It's easier to parse and copy and also it makes easier to use it with tools such as python's bytes.fromhex() without reformatting it.
This commit is contained in:
+1
-8
@@ -44,14 +44,7 @@ void
|
||||
line = g_string_new ("");
|
||||
|
||||
for (gint i = 0; i < len; i++)
|
||||
{
|
||||
g_string_append_printf (line, "%02x ", buf[i]);
|
||||
if ((i + 1) % 16 == 0)
|
||||
{
|
||||
g_log (log_domain, G_LOG_LEVEL_DEBUG, "%s", line->str);
|
||||
g_string_set_size (line, 0);
|
||||
}
|
||||
}
|
||||
g_string_append_printf (line, "%02x", buf[i]);
|
||||
|
||||
if (line->len)
|
||||
g_log (log_domain, G_LOG_LEVEL_DEBUG, "%s", line->str);
|
||||
|
||||
Reference in New Issue
Block a user