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

Kevin Cernekee cernekee at gmail.com
Fri Jul 23 21:07:17 EDT 2010


On Sat, Jul 17, 2010 at 9:26 PM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> +int do_oob_op(libmtd_t desc, const struct mtd_dev_info *mtd, int fd,
> +             uint64_t start, uint64_t length, void *data, int cmd64, int cmd)

cmd64 should be an unsigned int.  When it gets compared to
MEMREADOOB64 (0xc0184d16), gcc says "comparison is always false due to
limited range of data type."

> +       if (cmd64 ==  MEMREADOOB64) {

Extra space after ==

> +               /*
> +                * MEMREADOOB64/MEMWRITEOOB64 support was added in kernel
> +                * version 2.6.30, so probably we are working with older kernel
> +                * and these ioctls are not supported.
> +                */

The new sysfs attributes were in 2.6.30, but the new ioctls did not
make it in until 2.6.31 (commit 0dc54e).



More information about the linux-mtd mailing list