mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Merge aa-status: append \n to --json and --pretty-json output
... so that - if someone calls aa-status from the commandline - the next prompt doesn't get displayed in the same line as the json output. MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/541 Acked-by: Steve Beattie <steve.beattie@canonical.com> Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
commit
1fccf0458f
1 changed files with 2 additions and 2 deletions
|
@ -534,7 +534,7 @@ static int detailed_output(FILE *json) {
|
|||
free_processes(filtered, nfiltered);
|
||||
}
|
||||
if (json) {
|
||||
fprintf(json, "%s}}", nprocesses > 0 ? "]" : "");
|
||||
fprintf(json, "%s}}\n", nprocesses > 0 ? "]" : "");
|
||||
}
|
||||
|
||||
exit:
|
||||
|
@ -578,7 +578,7 @@ static int cmd_pretty_json(__unused const char *command) {
|
|||
dfprintf(stderr, "Failed to print pretty json");
|
||||
return AA_EXIT_INTERNAL_ERROR;
|
||||
}
|
||||
fprintf(stdout, "%s", pretty);
|
||||
fprintf(stdout, "%s\n", pretty);
|
||||
|
||||
return AA_EXIT_ENABLED;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue