From: Piotr Dymacz Date: Tue, 28 Apr 2015 22:08:12 +0000 (+0200) Subject: Print all available baud rates if selected is not supported X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ff391446496efd4d8b377212c3f9e2f507ac71da;p=oweals%2Fu-boot_mod.git Print all available baud rates if selected is not supported --- 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); }