mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-15 22:05:18 -05:00
ucm: Fix sysw sequence command not working when requesting to ignore errors
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>
This commit is contained in:
parent
6ddba54a07
commit
06543e06e9
1 changed files with 4 additions and 1 deletions
|
|
@ -517,7 +517,10 @@ static int execute_sysw(const char *sysw)
|
||||||
if (sysw == NULL || *sysw == '\0')
|
if (sysw == NULL || *sysw == '\0')
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ignore_error = sysw[0] == '-';
|
if (sysw[0] == '-') {
|
||||||
|
ignore_error = true;
|
||||||
|
sysw++;
|
||||||
|
}
|
||||||
|
|
||||||
if (sysw[0] == ':')
|
if (sysw[0] == ':')
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue