[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1337675012.2483.134.camel@sauron.fi.intel.com>
Date: Tue, 22 May 2012 11:23:32 +0300
From: Artem Bityutskiy <dedekind1@...il.com>
To: Richard Weinberger <richard@....at>
Cc: linux-mtd@...ts.infradead.org, tglx@...utronix.de,
linux-kernel@...r.kernel.org, Heinz.Egger@...utronix.de,
tim.bird@...sony.com
Subject: Re: [PATCH 1/7] [RFC] UBI: Export next_sqnum()
On Mon, 2012-05-21 at 16:16 +0200, Richard Weinberger wrote:
> > It still contains EC and VID headers. So you can use the existing code
> > for scanning it.
>
> I use already ubi_io_read_vid_hdr() and ubi_io_read_ec_hdr() what should
> I reuse?
As I wrote: 'process_eb()'. Now it is named 'scan_peb()' after the
renames.
It does all the work to scan PEB headers. Create a _separate_ 'struct
ubi_attach_info' run 'scan_peb()' for each PEB of the fastmap. Check for
errors, and sanity (all headers are there, no errors, etc, may be an
extra self-check function would be appropriate here). Then go through
the resulting fastmap volume attach info, read and process the fastmap
_contents_. Of course you need the second (real) attach info for the
data you read from the fastmep. This is what I call "reuse the existing"
code.
How does this sound to you?
> Also checking the image sequence would make sense.
Yes, you should check everything. If you reuse the code, you will get
this automatically, no?
--
Best Regards,
Artem Bityutskiy
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists