On Saturday 28 March 2009 01:04:10 Minkyu Kang wrote:
> +     case 2:
> +             if (strncmp(argv[1], "init", 4) == 0) {
> +             } else if (strncmp(argv[1], "dev", 3) == 0) {

why strncmp ?  i dont think it makes sense to support "init", "init.moo" 
"initaksldfjaksldfjasdf" ...

> +                             printf("No MMC card found\n");

no format modifiers -> use puts()

> +                     if (curr_device < 0) {
> +                             printf("no MMC devices available\n");

puts("No MMC card selected\n");

> +     case 3:

considering how much code is duplicated with "case 2", seems like it would 
make sense to unify them and have each piece check the argc

>  U_BOOT_CMD(
> -     mmcinit,        1,      0,      do_mmc,
> -     "init mmc card",
> -     NULL
> +     mmc,    3,      1,      do_mmc,
> +     "MMC sub-system",
> +     "mmc init [dev] - init MMC sub system\n"

first usage string should omit the command.  run 'help mmc' on the board to 
see why ...
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to