From: Lennart Poettering Date: Thu, 31 May 2018 10:05:53 +0000 (+0200) Subject: portablectl: don't join strv if we don't want to display it X-Git-Tag: v239~173^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21cffed715d1ae6f2102c63555d16acacb402379;p=thirdparty%2Fsystemd.git portablectl: don't join strv if we don't want to display it --- diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c index 21057154c55..5c56bce2b87 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);