mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-03-10 00:00:04 +03:00
Use printbuf_indent_push
This properly indents multi-line printbuf output Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
de4e778a6a
commit
803d749d86
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user