bcachefs: Pretty-ify bch2_bkey_val_to_text()

Don't print out the ": " when there isn't a value to print.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet 2021-07-21 13:55:51 -04:00 committed by Kent Overstreet
parent 3820054426
commit d7b21954b9

View File

@ -269,7 +269,7 @@ void bch2_bkey_val_to_text(struct printbuf *out, struct bch_fs *c,
{
bch2_bkey_to_text(out, k.k);
if (k.k) {
if (bkey_val_bytes(k.k)) {
pr_buf(out, ": ");
bch2_val_to_text(out, c, k);
}