Dear Lei Wen, In message <1283862729-17045-3-git-send-email-lei...@marvell.com> you wrote: > Signed-off-by: Lei Wen <lei...@marvell.com> > --- > common/cmd_mmc.c | 20 ++++++++++++++++++++ > disk/part.c | 3 +++ > 2 files changed, 23 insertions(+), 0 deletions(-) > > diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c > index c0b30d8..af82984 100644 > --- a/common/cmd_mmc.c > +++ b/common/cmd_mmc.c > @@ -154,6 +154,25 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char > * const argv[]) > mmc_init(mmc); > > return 0; > + } else if (strncmp(argv[1], "part", 4) == 0) { > + int dev = simple_strtoul(argv[2], NULL, 10); > + block_dev_desc_t *mmc_dev; > + struct mmc *mmc = find_mmc_device(dev); > + > + if (!mmc) > + return 1;
Please print error message in case of errors. > + mmc_init(mmc); > + mmc_dev = mmc_get_dev(dev); > + if (mmc_dev != NULL && > + mmc_dev->type != DEV_TYPE_UNKNOWN) { > + rc = 1; > + print_part(mmc_dev); Do we need to set rc at all? Just do a "return 0" here. > + } > + if (!rc) { > + printf("\nno mmc devices available\n"); > + return 1; No leading newline, please. And use puts() for strings that do not need formatting. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Youth doesn't excuse everything. -- Dr. Janice Lester (in Kirk's body), "Turnabout Intruder", stardate 5928.5. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot