]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
stat-util: drop now unused statx_warn_mount_{id,root}() 40507/head
authorMike Yuan <me@yhndnzj.com>
Thu, 29 Jan 2026 09:59:42 +0000 (10:59 +0100)
committerMike Yuan <me@yhndnzj.com>
Thu, 5 Feb 2026 13:14:40 +0000 (14:14 +0100)
src/basic/stat-util.c
src/basic/stat-util.h

index 703cf4fc9252bf00b83c85787c1cd2067b53d486..9eaf17624a9e1a20b113fd484e73ab96c2acdaaa 100644 (file)
@@ -701,25 +701,3 @@ mode_t inode_type_from_string(const char *s) {
 
         return MODE_INVALID;
 }
-
-int statx_warn_mount_root(const struct statx *sx, int log_level) {
-        assert(sx);
-
-        /* The STATX_ATTR_MOUNT_ROOT flag is supported since kernel v5.8. */
-        if (!FLAGS_SET(sx->stx_attributes_mask, STATX_ATTR_MOUNT_ROOT))
-                return log_full_errno(log_level, SYNTHETIC_ERRNO(ENOSYS),
-                                      "statx() did not set STATX_ATTR_MOUNT_ROOT, running on an old kernel?");
-
-        return 0;
-}
-
-int statx_warn_mount_id(const struct statx *sx, int log_level) {
-        assert(sx);
-
-        /* The STATX_MNT_ID flag is supported since kernel v5.10. */
-        if (!FLAGS_SET(sx->stx_mask, STATX_MNT_ID))
-                return log_full_errno(log_level, SYNTHETIC_ERRNO(ENOSYS),
-                                      "statx() does not support STATX_MNT_ID, running on an old kernel?");
-
-        return 0;
-}
index 77d9f55c63edf05d6f128dc9a7bc9ea48d95f251..97dedd4b80b9f974f5fc8b1fab3abd95c07fb752 100644 (file)
@@ -135,6 +135,3 @@ static inline bool inode_type_can_hardlink(mode_t m) {
          * type). */
         return IN_SET(m & S_IFMT, S_IFSOCK, S_IFLNK, S_IFREG, S_IFBLK, S_IFCHR, S_IFIFO);
 }
-
-int statx_warn_mount_root(const struct statx *sx, int log_level);
-int statx_warn_mount_id(const struct statx *sx, int log_level);