mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -05:00
ucm: add exec sequence command
This change renames the original exec command to shell which is more appropriate. Implement a light version of the exec command which calls directly the specified executable without the shell interaction (man 3 system). Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
a468505c96
commit
590df3a5b1
6 changed files with 312 additions and 7 deletions
|
|
@ -910,6 +910,7 @@ cset:
|
|||
|
||||
if (strcmp(cmd, "exec") == 0) {
|
||||
curr->type = SEQUENCE_ELEMENT_TYPE_EXEC;
|
||||
exec:
|
||||
err = parse_string_substitute3(uc_mgr, n, &curr->data.exec);
|
||||
if (err < 0) {
|
||||
uc_error("error: exec requires a string!");
|
||||
|
|
@ -918,6 +919,11 @@ cset:
|
|||
continue;
|
||||
}
|
||||
|
||||
if (strcmp(cmd, "shell") == 0) {
|
||||
curr->type = SEQUENCE_ELEMENT_TYPE_SHELL;
|
||||
goto exec;
|
||||
}
|
||||
|
||||
if (strcmp(cmd, "comment") == 0)
|
||||
goto skip;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue