From 21cffed715d1ae6f2102c63555d16acacb402379 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 31 May 2018 12:05:53 +0200 Subject: [PATCH] portablectl: don't join strv if we don't want to display it --- src/portable/portablectl.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c index 21057154c5..5c56bce2b8 100644 --- a/src/portable/portablectl.c +++ b/src/portable/portablectl.c @@ -141,18 +141,20 @@ static int determine_matches(const char *image, char **l, bool allow_any, char * if (!arg_quiet) log_info("(Matching all unit files.)"); } else { - _cleanup_free_ char *joined = NULL; k = strv_copy(l); if (!k) return log_oom(); - joined = strv_join(k, "', '"); - if (!joined) - return log_oom(); + if (!arg_quiet) { + _cleanup_free_ char *joined = NULL; + + joined = strv_join(k, "', '"); + if (!joined) + return log_oom(); - if (!arg_quiet) log_info("(Matching unit files with prefixes '%s'.)", joined); + } } *ret = TAKE_PTR(k);