Commit 114f530e authored by Hongbo Li's avatar Hongbo Li Committed by Kent Overstreet
Browse files

bcachefs: show none if label is not set



If label is not set, the Label tag in superblock info show '(none)'.

```
[Before]
Device index:                               0
Label:
Version:                                    1.4: member_seq

[After]
Device index:                               0
Label:                                      (none)
Version:                                    1.4: member_seq
```

Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 7b6dda72
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1312,6 +1312,9 @@ void bch2_sb_to_text(struct printbuf *out, struct bch_sb *sb,
	prt_printf(out, "Device index:\t%u\n", sb->dev_idx);

	prt_printf(out, "Label:\t");
	if (!strlen(sb->label))
		prt_printf(out, "(none)");
	else
		prt_printf(out, "%.*s", (int) sizeof(sb->label), sb->label);
	prt_newline(out);