From: Artem Bityutskiy <dedekind1@gmail.com>
To: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Cc: linux-mtd@lists.infradead.org, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH 1/4] mtd: add new ioctl structures to be used for repartitioning
Date: Sun, 18 Jul 2010 20:00:31 +0300 [thread overview]
Message-ID: <1279472431.16247.67.camel@localhost.localdomain> (raw)
In-Reply-To: <1276855711-18570-2-git-send-email-roman.tereshonkov@nokia.com>
CCing Arnd to review the ioctl interface.
One thing just struck me, see below.
On Fri, 2010-06-18 at 13:08 +0300, Roman Tereshonkov wrote:
> Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
> ---
> include/mtd/mtd-abi.h | 15 +++++++++++++++
> 1 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
> index be51ae2..c2c6b41 100644
> --- a/include/mtd/mtd-abi.h
> +++ b/include/mtd/mtd-abi.h
> @@ -88,6 +88,20 @@ struct otp_info {
> __u32 locked;
> };
>
> +#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.
Also please, document the ioctl a little - add some comments.
> +
> #define MEMGETINFO _IOR('M', 1, struct mtd_info_user)
> #define MEMERASE _IOW('M', 2, struct erase_info_user)
> #define MEMWRITEOOB _IOWR('M', 3, struct mtd_oob_buf)
> @@ -110,6 +124,7 @@ struct otp_info {
> #define MEMERASE64 _IOW('M', 20, struct erase_info_user64)
> #define MEMWRITEOOB64 _IOWR('M', 21, struct mtd_oob_buf64)
> #define MEMREADOOB64 _IOWR('M', 22, struct mtd_oob_buf64)
> +#define MTDREPARTITION _IOW('M', 23, struct mtd_partitions)
>
> /*
> * Obsolete legacy interface. Keep it in order not to break userspace
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2010-07-18 17:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-18 10:08 [PATCH 0/4] mtd: add mtd repartition ioctl Roman Tereshonkov
2010-06-18 10:08 ` [PATCH 1/4] mtd: add new ioctl structures to be used for repartitioning Roman Tereshonkov
2010-06-18 10:08 ` [PATCH 2/4] mtd: add the possibility to modify partitions in runtime Roman Tereshonkov
2010-06-18 10:08 ` [PATCH 3/4] mtd: add MTDREPARTITION ioctl Roman Tereshonkov
2010-06-18 10:08 ` [PATCH 4/4] mtd: create the mtd master device for given set of partitions Roman Tereshonkov
2010-07-18 17:00 ` Artem Bityutskiy [this message]
2010-07-18 20:22 ` [PATCH 1/4] mtd: add new ioctl structures to be used for repartitioning Arnd Bergmann
2010-07-19 4:06 ` Artem Bityutskiy
2010-07-20 9:19 ` Arnd Bergmann
2010-07-20 9:25 ` Artem Bityutskiy
2010-07-08 5:50 ` [PATCH 0/4] mtd: add mtd repartition ioctl Artem Bityutskiy
2010-07-21 9:58 ` Artem Bityutskiy
2010-07-21 11:44 ` Vivek
2010-07-21 11:46 ` Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1279472431.16247.67.camel@localhost.localdomain \
--to=dedekind1@gmail.com \
--cc=arnd@arndb.de \
--cc=linux-mtd@lists.infradead.org \
--cc=roman.tereshonkov@nokia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox