From 212682fb0f72da8cfc749a012f874df2b42da1f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Sun, 16 Jun 2024 10:26:15 +0200 Subject: [PATCH] cli: Inform user when no feedback was found This might either be because the event doesn't exist or when the profile doesn't have any feedback on the current level. Closes: https://source.puri.sm/Librem5/feedbackd/-/issues/76 --- cli/fbcli.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/fbcli.c b/cli/fbcli.c index 6081ede..c412ebf 100644 --- a/cli/fbcli.c +++ b/cli/fbcli.c @@ -93,6 +93,9 @@ trigger_event (const char *name, const gchar *profile, gboolean important, gint g_main_loop_run (loop); g_main_loop_unref (loop); + if (lfb_event_get_end_reason (event) == LFB_EVENT_END_REASON_NOT_FOUND) + g_print ("No feedback found for '%s' at level '%s'\n", name, lfb_get_feedback_profile ()); + return success; }