mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-02 00:00:03 +03:00
bcacheadm: Fix bcacheadm status segfault if no devs given
Fixes DAT-1655 Change-Id: I79cfc78fb8513f3e751332d65310d65020c15e3e Signed-off-by: Jacob Malevich <jam@daterainc.com>
This commit is contained in:
parent
be4e8676b6
commit
f8d3f7da8f
@ -590,10 +590,12 @@ int bcache_status(NihCommand *command, char *const *args)
|
||||
free(sb);
|
||||
}
|
||||
|
||||
if(!seq_sb)
|
||||
if(!seq_sb) {
|
||||
printf("Unable to find a superblock\n");
|
||||
else
|
||||
return -1;
|
||||
} else {
|
||||
printf("%-50s%-15s%-4s\n", "uuid", "state", "tier");
|
||||
}
|
||||
|
||||
for (i = 0; i < seq_sb->nr_in_set; i++) {
|
||||
char uuid_str[40];
|
||||
|
Loading…
Reference in New Issue
Block a user