[U-Boot] [PATCH 2/2] mmc: print out avaible partition table

Sergei Shtylyov sshtylyov at mvista.com
Mon Sep 13 10:54:28 CEST 2010


Hello.

On 13-09-2010 8:06, Lei Wen wrote:

> Signed-off-by: Lei Wen<leiwen at 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..fe04f8d 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) {
> +				puts("no mmc devices available\n");
> +				return 1;
> +			}
> +			mmc_init(mmc);
> +			mmc_dev = mmc_get_dev(dev);
> +			if (mmc_dev != NULL &&
> +					mmc_dev->type != DEV_TYPE_UNKNOWN) {

    Too much indentation.

WBR, Sergei


More information about the U-Boot mailing list