mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-10 04:27:43 -05:00
ucm: add possibility to keep order of childs for If blocks
Because of the nature of the structured parser, it is not guaranteed
that the order of the parsed tree is equal to the lines in the source.
Add possibility to insert the If results before or after the selected
identifier like:
SectionDevice."Speaker" {
...
}
If.1 {
Condition { ... }
Before.SectionDevice "Speaker"
True { ... }
}
If.2 {
Condition { ... }
After.SectionDevice "Speaker"
True { ... }
}
If the "After" or "Before" identifiers are not found, the result is added
after the last entry in the block.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
4c021697f1
commit
a0b00a954e
2 changed files with 70 additions and 10 deletions
|
|
@ -175,7 +175,9 @@ static int evaluate_condition(snd_use_case_mgr_t *uc_mgr,
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
return uc_mgr_evaluate_condition(uc_mgr, cfg, n);
|
||||
err = uc_mgr_evaluate_condition(uc_mgr, cfg, n);
|
||||
snd_config_delete(n);
|
||||
return err;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue