[PATCHv2 4/5] libmtd: add support for 64-bit offsets, OOB

Artem Bityutskiy dedekind1 at gmail.com
Tue Jul 13 22:51:01 EDT 2010

On Tue, 2010-07-13 at 17:09 -0700, Kevin Cernekee wrote:
> On Tue, Jul 13, 2010 at 3:49 AM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> > You should find out whether the new ioctl's are supported in
> > 'libmtd_open()'. This also means that all libmtd calls which need this
> > flag will need a 'libmtd_t desc' parameter.
> Typically I just try the new ioctl first, then fall back to the old
> one if it returned -ENOTTY.  Could you recommend a way to detect the
> presence of the new ioctls from libmtd_open()?

Hmm, how about MEMERASE64 with start = length = -1? You can distinguish
between -ENOTTY and other error codes.

Best Regards,
Artem Bityutskiy (Артём Битюцкий)

More information about the linux-mtd mailing list