[PATCH v2 2/2] UBI: Make mtd parameter readable
Richard Weinberger
richard.weinberger at gmail.com
Tue Jan 10 05:33:32 PST 2017
Andy,
On Tue, Jan 10, 2017 at 1:56 PM, Andy Shevchenko
<andriy.shevchenko at linux.intel.com> wrote:
> Fix permissions to allow read mtd parameter back (only for owner).
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Please CC all maintainers in future. Otherwise the chance is high that
I'll miss a patch.
> ---
> drivers/mtd/ubi/build.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
> index 54312431750b..7bac790d4298 100644
> --- a/drivers/mtd/ubi/build.c
> +++ b/drivers/mtd/ubi/build.c
> @@ -1470,7 +1470,7 @@ static int ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
> return 0;
> }
>
> -module_param_call(mtd, ubi_mtd_param_parse, NULL, NULL, 000);
> +module_param_call(mtd, ubi_mtd_param_parse, NULL, NULL, 0400);
> MODULE_PARM_DESC(mtd, "MTD devices to attach. Parameter format: mtd=<name|num|path>[,<vid_hdr_offs>[,max_beb_per1024[,ubi_num]]].\n"
> "Multiple \"mtd\" parameters may be specified.\n"
> "MTD devices may be specified by their number, name, or path to the MTD character device node.\n"
What is the use case?
AFAIKT the permissions are 000 because a parser is involved and to
"understand" the parameter,
a reader needs the ubi_mtd_param_parse() function.
--
Thanks,
//richard
More information about the linux-mtd
mailing list