stat-util: provide single fallback implementation of statx()

This simplifies things quite a bit, and is reusable wherever we want to
use statx() later on. Not sure why I didn't do it like this right from
the beginning...
This commit is contained in:
Lennart Poettering
2020-09-03 15:02:34 +02:00
parent 7cd296c28f
commit ca194a2a0c
4 changed files with 160 additions and 130 deletions
+3
View File
@@ -10,6 +10,7 @@
#include <sys/vfs.h>
#include "macro.h"
#include "missing_stat.h"
int is_symlink(const char *path);
int is_dir(const char *path, bool follow);
@@ -92,6 +93,8 @@ int proc_mounted(void);
bool stat_inode_unmodified(const struct stat *a, const struct stat *b);
int statx_fallback(int dfd, const char *path, int flags, unsigned mask, struct statx *sx);
#if HAS_FEATURE_MEMORY_SANITIZER
# warning "Explicitly initializing struct statx, to work around msan limitation. Please remove as soon as msan has been updated to not require this."
# define STRUCT_STATX_DEFINE(var) \