[PATCH 7/8] UBI: add ioctl for max_beb_per1024

Artem Bityutskiy dedekind1 at gmail.com
Mon Aug 20 05:16:09 EDT 2012


On Mon, 2012-08-20 at 11:05 +0200, Richard Genoud wrote:
> 2012/8/17 Richard Genoud <richard.genoud at gmail.com>:
> > + * The accepted range is 0-255. If 0 is given, the default kernel config value
> > + * CONFIG_MTD_UBI_BEB_LIMIT will be used for compatibility.
> >   */
> >  struct ubi_attach_req {
> >         __s32 ubi_num;
> >         __s32 mtd_num;
> >         __s32 vid_hdr_offset;
> > -       __s8 padding[12];
> > +       __u8 max_beb_per1024;
> > +       __s8 padding[11];
> >  };
> >
> So if I use __u16 instead of __u8, what should be the upper limit ?
> 1024 ? (1024 is nonsense, but why not...)

Pick a reasonably large number, e.g., 768.

-- 
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/20120820/10c9c25f/attachment.sig>


More information about the linux-mtd mailing list