projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
810aa42
)
portablectl: don't join strv if we don't want to display it
author
Lennart Poettering
<lennart@poettering.net>
Thu, 31 May 2018 10:05:53 +0000
(12:05 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 31 May 2018 10:05:53 +0000
(12:05 +0200)
src/portable/portablectl.c
patch
|
blob
|
history
diff --git
a/src/portable/portablectl.c
b/src/portable/portablectl.c
index
2105715
..
5c56bce
100644
(file)
--- 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);