[PATCH 1/4] mtd: add new ioctl structures to be used for repartitioning
Artem Bityutskiy
dedekind1 at gmail.com
Mon Jul 19 00:06:26 EDT 2010
On Sun, 2010-07-18 at 20:22 +0000, Arnd Bergmann wrote:
> > > +#define MTD_MAX_PARTITION_NAME_LEN 64
> > > +struct mtd_partition_user {
> > > + __u64 size;
> > > + __u64 offset;
> > > + __u32 mask_flags;
> > > + char name[MTD_MAX_PARTITION_NAME_LEN];
> > > + __u8 padding[128]; /* reserved for future, must be zero! */
> > > +};
> > > +
> > > +struct mtd_partitions {
> > > + __u32 nparts;
> > > + struct mtd_partition_user __user *parts;
> > > +};
> >
> > Hmm, I think nowadays pointers should be passed as __u64 and
> > compat_ioctl() should be avoided.
>
> Yes, that's generally true. It would be nice if the BLKPG ioctl
> definition could be reused for this. It is more complicated
> than it should be, but not more than this suggestion, and
> it's an existing ioctl.
Thanks for reply.
MTD devices do not support BLKPG, do you mean we should you the same
data-structures and names as block devices?
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
More information about the linux-mtd
mailing list