mirror of
https://github.com/systemd/systemd.git
synced 2026-08-03 14:40:31 +00:00
home,resize-fs: replace XFS_SB_MAGIC -> XFS_SUPER_MAGIC
This commit is contained in:
@@ -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).");
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ int resize_fs(int fd, uint64_t sz, uint64_t *ret_size) {
|
||||
if (ret_size)
|
||||
*ret_size = sz;
|
||||
|
||||
} else if (is_fs_type(&sfs, XFS_SB_MAGIC)) {
|
||||
} else if (is_fs_type(&sfs, XFS_SUPER_MAGIC)) {
|
||||
xfs_fsop_geom_t geo;
|
||||
xfs_growfs_data_t d;
|
||||
|
||||
@@ -95,7 +95,7 @@ uint64_t minimal_size_by_fs_magic(statfs_f_type_t magic) {
|
||||
case (statfs_f_type_t) EXT4_SUPER_MAGIC:
|
||||
return EXT4_MINIMAL_SIZE;
|
||||
|
||||
case (statfs_f_type_t) XFS_SB_MAGIC:
|
||||
case (statfs_f_type_t) XFS_SUPER_MAGIC:
|
||||
return XFS_MINIMAL_SIZE;
|
||||
|
||||
case (statfs_f_type_t) BTRFS_SUPER_MAGIC:
|
||||
|
||||
Reference in New Issue
Block a user