aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorBin Meng2023-09-26 16:43:36 +0800
committerTom Rini2023-10-10 16:25:48 -0400
commit256f6da8cfbb0349fda9bc4a3fcfd74e5f5d8465 (patch)
tree67b068e3e06fb02e00cc8fe2b44080124b3bd39b /cmd
parente261fbf347854c75de50dd410904b436d49a7636 (diff)
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>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/host.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/host.c b/cmd/host.c
index 2334ccd9bcb..c33c2a9787e 100644
--- a/cmd/host.c
+++ b/cmd/host.c
@@ -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 {