[PATCH 1/7] [RFC] UBI: Export next_sqnum()

Artem Bityutskiy dedekind1 at gmail.com
Tue May 22 06:58:43 EDT 2012


On Mon, 2012-05-21 at 15:34 +0200, Richard Weinberger wrote:
> >       fm_start = ubi_find_fastmap(ubi);
> >       if (fm_start<  0)
> > +             /* TODO: instead, return 1 which means that fall-back
> to
> > +              * scanning is needed */
> 
> fm_start is the PEB number of the fastmap super block.
> It will return 1 if the super block was found at PEB 1.
> That's why it returns a negative values in case of an error 

OK, if 1 does not work - use 2, introduce your own constant. Using
-EINVAL is simply incorrect. Check what happens if the MTD driver
returns -EINVAL when you call 'ubi_io_read_vid_hdr()'.
-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120522/4296b332/attachment-0001.sig>


More information about the linux-mtd mailing list