Re: [PATCH v3 1/3] leds: triggers: provide led_trigger_register_format()

From: Andy Shevchenko
Date: Sun May 13 2018 - 10:34:50 EST


On Thu, May 10, 2018 at 2:22 PM, Pavel Machek <pavel@xxxxxx> wrote:
> On Thu 2018-05-10 13:21:01, Pavel Machek wrote:

>> I know this is not your fault, but if you have a space or "[]" in
>> netdev names, confusing things will happen.
>
> Hmm. If we are doing this we really should check trigger names for
> forbidden characters. At least "[] " should be forbidden.

So, string_escape_mem() is your helper here.

--
With Best Regards,
Andy Shevchenko