[PATCH] mtd: mtd-utils: Correct casting for final status report in flashcp
David Oberhollenzer
david.oberhollenzer at sigma-star.at
Tue Dec 13 17:16:51 PST 2016
On 12/14/2016 12:59 AM, Jon Fether wrote:
> Add correct casting for filestat.st_size in flashcp.c. While the
> interim status updates had correct casting from commit 08b243, the
> final update was not.
>
> Signed-off-by: Jonathan Fether <jonf at mds.com>
> ---
> diff --git a/misc-utils/flashcp.c b/misc-utils/flashcp.c
> index 6594a45..af3c88d 100644
> --- a/misc-utils/flashcp.c
> +++ b/misc-utils/flashcp.c
> @@ -386,8 +386,8 @@ int main (int argc,char *argv[])
> if (flags & FLAG_VERBOSE)
> log_printf (LOG_NORMAL,
> "\rVerifying data: %lluk/%lluk (100%%)\n",
> - KB (filestat.st_size),
> - KB (filestat.st_size));
> + KB ((unsigned long long)filestat.st_size),
> + KB ((unsigned long long)filestat.st_size));
> DEBUG("Verified %d / %lluk bytes\n",written,(unsigned long
> long)filestat.st_size);
Good catch! The cast used everywhere else in the file is indeed
missing there.
Unfortunately however, the format of your patch seems to be broken.
Thanks,
David
More information about the linux-mtd
mailing list