From 5bf4764d977d35c2075fc183bd75ef5b28a03cb4 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 8 Jul 2013 22:12:28 +0200 Subject: [PATCH] dont list services that have no instances Signed-off-by: John Crispin --- service.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service.c b/service.c index 7db1c4a..ffbc584 100644 --- a/service.c +++ b/service.c @@ -212,6 +212,9 @@ service_dump(struct service *s, int verbose) struct service_instance *in; void *c, *i; + if (avl_is_empty(&s->instances.avl)) + return; + c = blobmsg_open_table(&b, s->name); i = blobmsg_open_table(&b, "instances"); if (verbose && s->trigger) -- 2.30.2