diff options
author | Gabriel Ravier <gabravier@gmail.com> | 2024-09-13 22:00:15 +0200 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2024-09-13 16:58:21 -0400 |
commit | 251cbb6366403a056b39638264932c82d18ec610 (patch) | |
tree | 082b004a63119707e0fea4a06878cef191eca6f1 /src/linux/statx.c | |
parent | 8c43c562694fd0436494dc9d3faabb3eea86f9d8 (diff) | |
download | musl-251cbb6366403a056b39638264932c82d18ec610.tar.gz musl-251cbb6366403a056b39638264932c82d18ec610.tar.xz musl-251cbb6366403a056b39638264932c82d18ec610.zip |
statx: fix ENOSYS emulation not setting stx_rdev_*
The current implementation of the statx function fails to set the values of stx->stx_rdev_major and stx->stx_rdev_minor if the statx syscall fails with ENOSYS and thus the statx function has to fall back on fstatat-based emulation.
Diffstat (limited to 'src/linux/statx.c')
-rw-r--r-- | src/linux/statx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/linux/statx.c b/src/linux/statx.c index 4616bff4..5f6dde92 100644 --- a/src/linux/statx.c +++ b/src/linux/statx.c @@ -21,6 +21,8 @@ int statx(int dirfd, const char *restrict path, int flags, unsigned mask, struct stx->stx_dev_major = major(st.st_dev); stx->stx_dev_minor = minor(st.st_dev); + stx->stx_rdev_major = major(st.st_rdev); + stx->stx_rdev_minor = minor(st.st_rdev); stx->stx_ino = st.st_ino; stx->stx_mode = st.st_mode; stx->stx_nlink = st.st_nlink; |