From: Hans de Goede Date: Mon, 3 May 2021 20:52:44 +0000 (+0200) Subject: ucm: Fix sysw sequence command not working when requesting to ignore errors X-Git-Tag: v1.2.5~34 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=06543e06e913bafb4e2766c244f07be6a232ac4e;p=alsa-lib.git 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 Signed-off-by: Jaroslav Kysela --- diff --git a/src/ucm/main.c b/src/ucm/main.c index 2b07cc95..3df9b62a 100644 --- a/src/ucm/main.c +++ b/src/ucm/main.c @@ -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;