[PATCH MTD-UTILS v2 4/4] ubiattach: fail if kernel ignores max_beb_per1024

Richard Genoud richard.genoud at gmail.com
Thu Aug 23 06:01:14 EDT 2012


2012/8/23 Artem Bityutskiy <dedekind1 at gmail.com>:
>> +     } else if (err == 1) {
>> +             /*
>> +              * The kernel did not support the max_beb_per1024 parameter.
>> +              */
>> +             (void) ubi_detach_mtd(libubi, args.node, req.mtd_num);
>> +             errmsg("Your UBI driver does not allow changing the reserved PEBs count, probably you run an old kernel ? The support was added in kernel version 3.7.");
>> +             goto out_libubi;
>
> Here I've removed the ubi_detach_mtd() call and the goto. Since we have
> already spent energy for attaching, I think it is nicer to just print a
> warning and not detach, and let the user decide if he wants to detach.
Yes, I hesitate between error and warning.

Thanks !

Richard.



More information about the linux-mtd mailing list