mirror of
https://github.com/systemd/systemd
synced 2024-10-15 04:24:19 +00:00
repart: Remove unnecessary newlines from JSON output
Before ``` ➜ systemd git:(dissect-have-blkid) SYSTEMD_LOG_LEVEL=err build/systemd-repart --definitions definitions/ --dry-run=yes --empty=create --size=100M --json=pretty abc [ { "type" : "root-x86-64", "label" : "root-x86-64", "uuid" : "2f7c902c-6b2a-4b47-a44b-dca765f38cd2", "file" : "root.conf", "node" : "abc1", "offset" : 1048576, "old_size" : 0, "raw_size" : 103788544, "old_padding" : 0, "raw_padding" : 0, "activity" : "create" } ] ➜ systemd git:(dissect-have-blkid) ``` After: ``` ➜ systemd git:(repart-newlines) SYSTEMD_LOG_LEVEL=err build/systemd-repart --definitions definitions/ --dry-run=yes --empty=create --size=100M --json=pretty abc [ { "type" : "root-x86-64", "label" : "root-x86-64", "uuid" : "2f7c902c-6b2a-4b47-a44b-dca765f38cd2", "file" : "root.conf", "node" : "abc1", "offset" : 1048576, "old_size" : 0, "raw_size" : 103788544, "old_padding" : 0, "raw_padding" : 0, "activity" : "create" } ] ➜ systemd git:(repart-newlines) ```
This commit is contained in:
parent
03f5e9b221
commit
06c5a3847b
|
@ -3460,11 +3460,12 @@ static int context_write_partition_table(
|
|||
|
||||
(void) context_dump_partitions(context, node);
|
||||
|
||||
putc('\n', stdout);
|
||||
|
||||
if (arg_json_format_flags & JSON_FORMAT_OFF)
|
||||
if (arg_json_format_flags & JSON_FORMAT_OFF) {
|
||||
putc('\n', stdout);
|
||||
(void) context_dump_partition_bar(context, node);
|
||||
putc('\n', stdout);
|
||||
putc('\n', stdout);
|
||||
}
|
||||
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue