ucm: implement sysset sequence command

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-03-05 19:55:06 +01:00
parent 2b418648cf
commit 1c6fb20232
5 changed files with 107 additions and 9 deletions

View file

@ -508,12 +508,12 @@ static char *rval_sysfs(snd_use_case_mgr_t *uc_mgr ATTRIBUTE_UNUSED, const char
char path[PATH_MAX], link[PATH_MAX + 1];
struct stat sb;
ssize_t len;
char *e;
const char *e;
int fd;
e = getenv("SYSFS_PATH");
e = uc_mgr_sysfs_root();
if (e == NULL)
e = "/sys";
return NULL;
if (id[0] == '/')
id++;
snprintf(path, sizeof(path), "%s/%s", e, id);