summaryrefslogtreecommitdiff
path: root/src/basic/strv.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-03-19 23:32:43 +0900
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-03-20 09:32:09 +0100
commit00546c18fd2555e6140f17b307c45ac487e0c5ad (patch)
tree53c749a093292b30cc253706e888b9c613441a65 /src/basic/strv.c
parent7af15421e37db875a1577dd092ab55881848bcf1 (diff)
downloadsystemd-00546c18fd2555e6140f17b307c45ac487e0c5ad.tar.gz
strv: introduce strv_print_full()
Diffstat (limited to 'src/basic/strv.c')
-rw-r--r--src/basic/strv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/strv.c b/src/basic/strv.c
index 9b4a7663a9..5fcf3620a6 100644
--- a/src/basic/strv.c
+++ b/src/basic/strv.c
@@ -668,9 +668,9 @@ int strv_compare(char * const *a, char * const *b) {
return 0;
}
-void strv_print(char * const *l) {
+void strv_print_full(char * const *l, const char *prefix) {
STRV_FOREACH(s, l)
- puts(*s);
+ printf("%s%s\n", strempty(prefix), *s);
}
int strv_extendf(char ***l, const char *format, ...) {