stat-util: add helper stat_inode_same() for comparing stat's st_dev/st_ino in one

We do this all over the place, hence let's add a simple helper that does
this and particularly carefully and thoroughly.
This commit is contained in:
Lennart Poettering
2022-02-14 17:27:09 +01:00
parent d74da762a3
commit 38db6211b5
2 changed files with 14 additions and 5 deletions
+1
View File
@@ -92,6 +92,7 @@ int device_path_parse_major_minor(const char *path, mode_t *ret_mode, dev_t *ret
int proc_mounted(void);
bool stat_inode_same(const struct stat *a, const struct stat *b);
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);