CRC errors when continuous fseek/fputs on JFFS2
Jörn Engel
joern at wohnheim.fh-wedel.de
Mon May 15 11:57:59 EDT 2006
On Mon, 15 May 2006 17:46:06 +0200, Jörn Engel wrote:
>
> fopen(...,"w") will set fpos to 0. fseek(..., -4, SEEK_CUR) then sets
> it _back_. I would assume that an integer underflow happens next and
> fpos is close to 2^31, 2^32, 2^63 or 2^64. What is certain is that
> your testcase is not a valid piece of code.
I am an idiot. fseek doesn't go negative, as you write first.
> Can you try to change your testcase in two ways:
> o replace fopen/fseek/fwrite etc. with open/seek/write etc.
> o seek to something large directly after open
> and retest with that?
However, I always dislike extra layers when debugging. So
replacing fopen and friends with open is still a good idea.
Jörn
--
Courage is not the absence of fear, but rather the judgement that
something else is more important than fear.
-- Ambrose Redmoon
More information about the linux-mtd
mailing list