When the user requests to ignore sysfs write errors by prefixing
the path with a '-' then we need to skip the '-' when building the
actual path otherwise the write will never work.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
if (sysw == NULL || *sysw == '\0')
return 0;
- ignore_error = sysw[0] == '-';
+ if (sysw[0] == '-') {
+ ignore_error = true;
+ sysw++;
+ }
if (sysw[0] == ':')
return -EINVAL;