From ff391446496efd4d8b377212c3f9e2f507ac71da Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Wed, 29 Apr 2015 00:08:12 +0200 Subject: [PATCH] Print all available baud rates if selected is not supported --- u-boot/common/cmd_nvedit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) mode change 100644 => 100755 u-boot/common/cmd_nvedit.c diff --git a/u-boot/common/cmd_nvedit.c b/u-boot/common/cmd_nvedit.c old mode 100644 new mode 100755 index 74e2caa..7850041 --- a/u-boot/common/cmd_nvedit.c +++ b/u-boot/common/cmd_nvedit.c @@ -232,7 +232,12 @@ int _do_setenv(int flag, int argc, char *argv[]){ } if(i == N_BAUDRATES){ - printf("## Error: baudrate %d bps not supported\n", baudrate); + printf("## Error: baudrate %d bps is not supported,\n", baudrate); + printf(" choose one from the list:\n\n"); + for(i = 0; i < N_BAUDRATES; ++i){ + printf("- %7d bps%s\n", baudrate_table[i], baudrate_table[i] == gd->baudrate ? " [current]" : ""); + } + printf("\n"); return(1); } -- 2.25.1