From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: syed khader <khader_s_s@yahoo.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: CRC errors when continuous fseek/fputs on JFFS2
Date: Mon, 15 May 2006 17:57:59 +0200 [thread overview]
Message-ID: <20060515155759.GC10730@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <20060515154606.GB10730@wohnheim.fh-wedel.de>
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
next prev parent reply other threads:[~2006-05-15 15:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-15 15:15 CRC errors when continuous fseek/fputs on JFFS2 syed khader
2006-05-15 15:46 ` Jörn Engel
2006-05-15 15:57 ` Jörn Engel [this message]
[not found] <20060516061354.GA18958@wohnheim.fh-wedel.de>
2006-05-16 12:40 ` syed khader
2006-05-16 14:26 ` Jörn Engel
2006-05-16 15:01 ` syed khader
2006-05-16 15:31 ` Jörn Engel
2006-05-17 5:12 ` syed khader
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=20060515155759.GC10730@wohnheim.fh-wedel.de \
--to=joern@wohnheim.fh-wedel.de \
--cc=khader_s_s@yahoo.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 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.