mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-12 04:27:45 -05:00
ucm: Use LFS calls (stat, scandir)
Continue the work in commit ba86ac55 ("conf: Use LFS calls when reading
config files") and fix the UCM code, too.
Fixes: https://github.com/alsa-project/alsa-lib/pull/223
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
45b65fa4c1
commit
edec439a0c
4 changed files with 19 additions and 19 deletions
|
|
@ -499,7 +499,7 @@ static char *rval_env(snd_use_case_mgr_t *uc_mgr ATTRIBUTE_UNUSED, const char *i
|
|||
static char *rval_sysfs(snd_use_case_mgr_t *uc_mgr ATTRIBUTE_UNUSED, const char *id)
|
||||
{
|
||||
char path[PATH_MAX], link[PATH_MAX + 1];
|
||||
struct stat sb;
|
||||
struct stat64 sb;
|
||||
ssize_t len;
|
||||
const char *e;
|
||||
int fd;
|
||||
|
|
@ -510,7 +510,7 @@ static char *rval_sysfs(snd_use_case_mgr_t *uc_mgr ATTRIBUTE_UNUSED, const char
|
|||
if (id[0] == '/')
|
||||
id++;
|
||||
snprintf(path, sizeof(path), "%s/%s", e, id);
|
||||
if (lstat(path, &sb) != 0)
|
||||
if (lstat64(path, &sb) != 0)
|
||||
return NULL;
|
||||
if (S_ISLNK(sb.st_mode)) {
|
||||
len = readlink(path, link, sizeof(link) - 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue