diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-05-31 12:05:53 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-05-31 12:05:53 +0200 |
commit | 21cffed715d1ae6f2102c63555d16acacb402379 (patch) | |
tree | f17f9c4b2c1bd7ed9bcf8f78b2ec2314b828108b /src/portable/portablectl.c | |
parent | 810aa42575a0431c4c9ccbd86f85017a83ec7b46 (diff) | |
download | systemd-21cffed715d1ae6f2102c63555d16acacb402379.tar.gz |
portablectl: don't join strv if we don't want to display it
Diffstat (limited to 'src/portable/portablectl.c')
-rw-r--r-- | src/portable/portablectl.c | 12 |
1 files 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); |