All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: mtd-utils: Correct casting for final status report in flashcp
@ 2016-12-13 23:59 Jon Fether
  2016-12-14  1:16 ` David Oberhollenzer
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Fether @ 2016-12-13 23:59 UTC (permalink / raw)
  To: linux-mtd

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@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);

  exit (EXIT_SUCCESS);
--
2.8.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: mtd-utils: Correct casting for final status report in flashcp
  2016-12-13 23:59 [PATCH] mtd: mtd-utils: Correct casting for final status report in flashcp Jon Fether
@ 2016-12-14  1:16 ` David Oberhollenzer
  2016-12-14  1:29   ` Jon Fether
  0 siblings, 1 reply; 3+ messages in thread
From: David Oberhollenzer @ 2016-12-14  1:16 UTC (permalink / raw)
  To: Jon Fether, linux-mtd

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@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mtd: mtd-utils: Correct casting for final status report in flashcp
  2016-12-14  1:16 ` David Oberhollenzer
@ 2016-12-14  1:29   ` Jon Fether
  0 siblings, 0 replies; 3+ messages in thread
From: Jon Fether @ 2016-12-14  1:29 UTC (permalink / raw)
  To: linux-mtd

My apologies, I used git diff where I see I needed to use
git-format-patch. I will re-post the patch from that.

Best Regards,
-Jon

On Tue, Dec 13, 2016 at 5:16 PM, David Oberhollenzer
<david.oberhollenzer@sigma-star.at> wrote:
> 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@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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-14  1:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-13 23:59 [PATCH] mtd: mtd-utils: Correct casting for final status report in flashcp Jon Fether
2016-12-14  1:16 ` David Oberhollenzer
2016-12-14  1:29   ` Jon Fether

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.