mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04: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')
|
||||
return 0;
|
||||
|
||||
ignore_error = sysw[0] == '-';
|
||||
if (sysw[0] == '-') {
|
||||
ignore_error = true;
|
||||
sysw++;
|
||||
}
|
||||
|
||||
if (sysw[0] == ':')
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue