]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
cmd_list_journal: Make output more readable
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 29 Mar 2022 19:07:28 +0000 (15:07 -0400)
committerKent Overstreet <kent.overstreet@gmail.com>
Tue, 29 Mar 2022 19:07:59 +0000 (15:07 -0400)
This puts a blank line before log entries, which are used to denote the
start of a transaction commit.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
cmd_debug.c

index 33c4a1b15a58068e11b1931d3424b94be5085434..04afea1387013ca1ee779365a328c0a7017aa947 100644 (file)
@@ -664,8 +664,9 @@ int cmd_list_journal(int argc, char *argv[])
                         * log entries denote the start of a new transaction
                         * commit:
                         */
-                       pr_indent_push(&buf,
-                               entry->type == BCH_JSET_ENTRY_log ? 2 : 4);
+                       if (entry->type == BCH_JSET_ENTRY_log)
+                               pr_newline(&buf);
+                       pr_indent_push(&buf, 4);
                        bch2_journal_entry_to_text(&buf, c, entry);
 
                        if (blacklisted)