summaryrefslogtreecommitdiff
path: root/cmd_debug.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-02-16 06:31:13 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2022-02-16 06:45:04 -0500
commit803d749d862f5dfbf1c34e443afb6f279e1d6a48 (patch)
treec5587506a0bee66253a182bf92186d10f545444d /cmd_debug.c
parentde4e778a6add88e6ccf5a7730a8d343d3fb5f064 (diff)
Use printbuf_indent_push
This properly indents multi-line printbuf output Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'cmd_debug.c')
-rw-r--r--cmd_debug.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd_debug.c b/cmd_debug.c
index 71e729c..6ff58a9 100644
--- a/cmd_debug.c
+++ b/cmd_debug.c
@@ -606,10 +606,12 @@ int cmd_list_journal(int argc, char *argv[])
le64_to_cpu(p->j.last_seq));
vstruct_for_each(&p->j, entry) {
- char buf[500];
+ char _buf[4096];
+ struct printbuf buf = PBUF(_buf);
- bch2_journal_entry_to_text(&PBUF(buf), c, entry);
- printf(" %s\n", buf);
+ printbuf_indent_push(&buf, 2);
+ bch2_journal_entry_to_text(&buf, c, entry);
+ printf("%s\n", _buf);
}
}