public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Bad typecast in flash_eraseall ?
@ 2006-08-07 10:42 Samuel ]slund
  0 siblings, 0 replies; only message in thread
From: Samuel ]slund @ 2006-08-07 10:42 UTC (permalink / raw)
  To: linux-mtd

Hi,

I recently dovnloaded the mtd-utils-1.0.0.tar.gz from www.infradead.org.
When running "flash_eraseall" on a Micrel ks8695p I get some wierd output: 

/ # flash_eraseall /dev/mtd1
Erasing 64 Kibyte @ 30000 -- 4294901765 % complete.

When I moved the typecast (unsigned long long)
at line 155 from before "erase.start" to before "100" :
                           ("\rErasing %d Kibyte @ %x -- %2llu %% complete.",
                             meminfo.erasesize / 1024, erase.start,
                             erase.start *
                             (unsigned long long) 100 / meminfo.size);

the output became correct:
/ # flash_eraseall /dev/mtd1
Erasing 64 Kibyte @ 100000 -- 26 % complete.

Seems like a bug, thought you might want to know.

//Samuel

PS.
Sorry if this has been mentioned before, I did google a bit on the 
list archives but the search interface is not very friendly.
DS.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-08-07 10:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-07 10:42 Bad typecast in flash_eraseall ? Samuel ]slund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox