From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] dfu:usb:fix: Read the "filesize" environment variable only when file read
Date: Fri, 24 Aug 2012 16:31:47 +0200 [thread overview]
Message-ID: <201208241631.47839.marex@denx.de> (raw)
In-Reply-To: <1345800836-15573-2-git-send-email-l.majewski@samsung.com>
Dear Lukasz Majewski,
> The "filesize" environment variable shall be read only when relevant
> file is read.
>
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Marek Vasut <marex@denx.de>
> ---
> drivers/dfu/dfu_mmc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
> index 2270a61..5d504df 100644
> --- a/drivers/dfu/dfu_mmc.c
> +++ b/drivers/dfu/dfu_mmc.c
> @@ -89,7 +89,7 @@ static int mmc_file_op(enum dfu_mmc_op op, struct
> dfu_entity *dfu, return ret;
> }
>
> - if (dfu->layout != DFU_RAW_ADDR) {
> + if (dfu->layout != DFU_RAW_ADDR && op == DFU_OP_READ) {
> str_env = getenv("filesize");
> if (str_env == NULL) {
> puts("dfu: Wrong file size!\n");
Best regards,
Marek Vasut
next prev parent reply other threads:[~2012-08-24 14:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-24 9:33 [U-Boot] [PATCH 1/2] dfu:usb: Support for ext4 Lukasz Majewski
2012-08-24 9:33 ` [U-Boot] [PATCH 2/2] dfu:usb:fix: Read the "filesize" environment variable only when file read Lukasz Majewski
2012-08-24 14:31 ` Marek Vasut [this message]
2012-08-24 14:31 ` [U-Boot] [PATCH 1/2] dfu:usb: Support for ext4 Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201208241631.47839.marex@denx.de \
--to=marek.vasut@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox