From: Mike Yuan Date: Thu, 29 Jan 2026 09:59:42 +0000 (+0100) Subject: stat-util: drop now unused statx_warn_mount_{id,root}() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9feb490633a2e8e38bc5828625ff116b80050f74;p=thirdparty%2Fsystemd.git stat-util: drop now unused statx_warn_mount_{id,root}() --- diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c index 703cf4fc925..9eaf17624a9 100644 --- a/src/basic/stat-util.c +++ b/src/basic/stat-util.c @@ -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; -} diff --git a/src/basic/stat-util.h b/src/basic/stat-util.h index 77d9f55c63e..97dedd4b80b 100644 --- a/src/basic/stat-util.h +++ b/src/basic/stat-util.h @@ -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);