mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
networkctl-cat: insert a newline between different config files
This commit is contained in:
parent
15fde154f8
commit
c5f51d5f3f
|
@ -459,6 +459,7 @@ int verb_cat(int argc, char *argv[], void *userdata) {
|
|||
|
||||
pager_open(arg_pager_flags);
|
||||
|
||||
bool first = true;
|
||||
STRV_FOREACH(name, strv_skip(argv, 1)) {
|
||||
_cleanup_strv_free_ char **dropins = NULL;
|
||||
_cleanup_free_ char *path = NULL;
|
||||
|
@ -481,9 +482,14 @@ int verb_cat(int argc, char *argv[], void *userdata) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!first)
|
||||
putchar('\n');
|
||||
|
||||
r = cat_files(path, dropins, /* flags = */ CAT_FORMAT_HAS_SECTIONS);
|
||||
if (r < 0)
|
||||
return RET_GATHER(ret, r);
|
||||
|
||||
first = false;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue