diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-03-19 23:32:43 +0900 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-03-20 09:32:09 +0100 |
commit | 00546c18fd2555e6140f17b307c45ac487e0c5ad (patch) | |
tree | 53c749a093292b30cc253706e888b9c613441a65 /src/basic/strv.c | |
parent | 7af15421e37db875a1577dd092ab55881848bcf1 (diff) | |
download | systemd-00546c18fd2555e6140f17b307c45ac487e0c5ad.tar.gz |
strv: introduce strv_print_full()
Diffstat (limited to 'src/basic/strv.c')
-rw-r--r-- | src/basic/strv.c | 4 |
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, ...) { |