linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Paul Barker <paul@paulbarker.me.uk>
To: linux-mtd@lists.infradead.org, Fabien Proriol <fabien.proriol@jdsu.com>
Subject: Fixing off_t handling in flashcp
Date: Sat, 26 Sep 2015 11:55:07 +0100	[thread overview]
Message-ID: <20150926105507.GA2711@bang.betafive.co.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]

Hi,

flashcp uses "%lu" to print values of type off_t. For example, from line 307 of
flashcp.c, with formatting butchered to fit in 80 cols:

    log_printf (LOG_NORMAL,"\rWriting data: %dk/%luk (%lu%%)",
                KB (written + i),
                KB (filestat.st_size),
                PERCENTAGE (written + i,filestat.st_size));

The KB() macro doesn't change the type of filestat.st_size, which is 64 bits
when large file support is enabled. On a 32-bit system this should be printed as
"%llu" not "%lu".

Looking through the archives there is already a patch to address this but it
doesn't seem to have been applied or replied to:
http://lists.infradead.org/pipermail/linux-mtd/2014-November/056410.html

I'd like to see this fixed as the current display output is ugly on our systems.
Could someone take another look at this patch from Fabien? I'll also test this
at work this week to ensure it works correctly.

Thanks,

-- 
Paul Barker

Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

             reply	other threads:[~2015-09-26 10:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-26 10:55 Paul Barker [this message]
2015-09-28 11:38 ` RE:Fixing off_t handling in flashcp Fabien Proriol

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=20150926105507.GA2711@bang.betafive.co.uk \
    --to=paul@paulbarker.me.uk \
    --cc=fabien.proriol@jdsu.com \
    --cc=linux-mtd@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).