diff options
| author | Thomas Weißschuh <thomas@t-8ch.de> | 2023-08-03 07:13:28 +0200 |
|---|---|---|
| committer | Thomas Weißschuh <thomas@t-8ch.de> | 2023-08-03 07:21:10 +0200 |
| commit | 91c2cbdf3a04f2f3f4c4bb0d2a6053874bfa11ea (patch) | |
| tree | e48f90b2a81e7900f80de8779c5a9e2787511890 /libmount/src | |
| parent | a6dd313bf2f5bc901ddc65262807075587ecb895 (diff) | |
| download | util-linux-91c2cbdf3a04f2f3f4c4bb0d2a6053874bfa11ea.tar.gz | |
libmount: (utils) fix statx fallback
If the systemcall is not available ENOSYS is returned.
Under glibc the statx implementation also has its own fallback logic.
As AT_STATX_DONT_SYNC can't be implemented correctly in that fallback
logic the wrapper will return EINVAL in case the emulation is needed and
AT_STATX_DONT_SYNC is set.
So also use our own fallback in that case.
Fixes: #2409
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Diffstat (limited to 'libmount/src')
| -rw-r--r-- | libmount/src/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmount/src/utils.c b/libmount/src/utils.c index 50553f1d5a..410ded4aa2 100644 --- a/libmount/src/utils.c +++ b/libmount/src/utils.c @@ -133,7 +133,8 @@ static int safe_stat(const char *target, struct stat *st, int nofollow) st->st_mode = stx.stx_mode; } - if (rc == 0 || errno != EOPNOTSUPP) + if (rc == 0 || + (errno != EOPNOTSUPP && errno != ENOSYS && errno != EINVAL)) return rc; } #endif |
