summaryrefslogtreecommitdiffstats
path: root/src/home
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-04-17 17:03:48 +0200
committerGitHub <noreply@github.com>2024-04-17 17:03:48 +0200
commit7e16650d83781cb9dad8e009abde335db5fa079f (patch)
tree2d5a6fef90ef61c3d7db7b19205fe06b9a2e0bbd /src/home
parentMerge pull request #32311 from YHNdnzj/write-ellipsis (diff)
parentmeson: use headers in our code base when checking filesystem table (diff)
downloadsystemd-7e16650d83781cb9dad8e009abde335db5fa079f.tar.xz
systemd-7e16650d83781cb9dad8e009abde335db5fa079f.zip
Merge pull request #32143 from yuwata/magic
basic/linux: copy magic.h from kernel to our code
Diffstat (limited to 'src/home')
-rw-r--r--src/home/homework-luks.c2
-rw-r--r--src/home/homework-quota.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/home/homework-luks.c b/src/home/homework-luks.c
index 2a000c1070..f9cc6eced8 100644
--- a/src/home/homework-luks.c
+++ b/src/home/homework-luks.c
@@ -2553,7 +2553,7 @@ static int can_resize_fs(int fd, uint64_t old_size, uint64_t new_size) {
/* btrfs can grow and shrink online */
- } else if (is_fs_type(&sfs, XFS_SB_MAGIC)) {
+ } else if (is_fs_type(&sfs, XFS_SUPER_MAGIC)) {
if (new_size < XFS_MINIMAL_SIZE)
return log_error_errno(SYNTHETIC_ERRNO(ERANGE), "New file system size too small for xfs (needs to be 14M at least).");
diff --git a/src/home/homework-quota.c b/src/home/homework-quota.c
index 508c0c01b2..7400937e95 100644
--- a/src/home/homework-quota.c
+++ b/src/home/homework-quota.c
@@ -99,7 +99,7 @@ int home_update_quota_auto(UserRecord *h, const char *path) {
if (statfs(path, &sfs) < 0)
return log_error_errno(errno, "Failed to statfs() file system: %m");
- if (is_fs_type(&sfs, XFS_SB_MAGIC) ||
+ if (is_fs_type(&sfs, XFS_SUPER_MAGIC) ||
is_fs_type(&sfs, EXT4_SUPER_MAGIC))
return home_update_quota_classic(h, path);