cmd: host: Print out the block size of the host device

It's useful if we can print out the block size of the host device
in the "host info" command.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Bin Meng
2023-09-26 16:43:36 +08:00
committed by Tom Rini
parent e261fbf347
commit 256f6da8cf
2 changed files with 14 additions and 13 deletions

View File

@@ -160,8 +160,8 @@ static void show_host_dev(struct udevice *dev)
return;
desc = dev_get_uclass_plat(blk);
printf("%12lu %-15s %s\n", (unsigned long)desc->lba, plat->label,
plat->filename);
printf("%12lu %6lu %-15s %s\n", (unsigned long)desc->lba, desc->blksz,
plat->label, plat->filename);
}
static int do_host_info(struct cmd_tbl *cmdtp, int flag, int argc,
@@ -179,7 +179,8 @@ static int do_host_info(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
}
printf("%3s %12s %-15s %s\n", "dev", "blocks", "label", "path");
printf("%3s %12s %6s %-15s %s\n",
"dev", "blocks", "blksz", "label", "path");
if (dev) {
show_host_dev(dev);
} else {