From a2c5773b0392cd2d98386a09c5c8a726af25ed87 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 15 Aug 2020 17:50:19 -0400 Subject: [PATCH] Log when service name pattern doesn't match --- daemon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon.c b/daemon.c index 3fff805..3cfe24f 100644 --- a/daemon.c +++ b/daemon.c @@ -148,6 +148,7 @@ static void parseControl(char *command) { } while (command) { + bool found = false; char *pattern = strsep(&command, WS); for (size_t i = 0; i < services.len; ++i) { struct Service *service = &services.ptr[i]; @@ -157,7 +158,9 @@ static void parseControl(char *command) { } else { fn(service); } + found = true; } + if (!found) syslog(LOG_NOTICE, "no services matching %s", pattern); } }