mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
ucm: config - substitute File string to allow variables in include
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
8a36b43e03
commit
6cc6024ac5
1 changed files with 7 additions and 3 deletions
|
|
@ -44,6 +44,7 @@ static int include_eval_one(snd_use_case_mgr_t *uc_mgr,
|
|||
snd_config_t **after)
|
||||
{
|
||||
const char *file;
|
||||
char *s;
|
||||
int err;
|
||||
|
||||
*result = NULL;
|
||||
|
|
@ -71,11 +72,14 @@ static int include_eval_one(snd_use_case_mgr_t *uc_mgr,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
return uc_mgr_config_load_file(uc_mgr, file, result);
|
||||
err = uc_mgr_get_substituted_value(uc_mgr, &s, file);
|
||||
if (err < 0)
|
||||
return err;
|
||||
err = uc_mgr_config_load_file(uc_mgr, s, result);
|
||||
free(s);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
static void config_dump(snd_config_t *cfg)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue