[gparted] Remove struct FS members .MIN & .MAX (#787204)



commit e234df6b2e924531d6df1bba19db5ee5c718710d
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Mon Jan 15 20:18:59 2018 +0000

    Remove struct FS members .MIN & .MAX (#787204)
    
    All the code has been switched to call get_filesystem_limits() and use
    struct FS_Limits.  Remove struct FS members .MIN & .MAX.
    
    Bug 787204 - Minimum and maximum size of the UDF partition/disk

 include/Utils.h |    4 ----
 src/btrfs.cc    |    1 -
 src/ext2.cc     |    3 ---
 src/fat16.cc    |    4 ----
 src/hfs.cc      |    1 -
 src/jfs.cc      |    1 -
 src/nilfs2.cc   |    1 -
 src/ntfs.cc     |    1 -
 src/reiserfs.cc |    1 -
 src/udf.cc      |    2 --
 src/xfs.cc      |    4 ++--
 11 files changed, 2 insertions(+), 21 deletions(-)
---
diff --git a/include/Utils.h b/include/Utils.h
index 0c75003..a15c760 100644
--- a/include/Utils.h
+++ b/include/Utils.h
@@ -163,15 +163,11 @@ struct FS
        Support online_grow ;
        Support online_shrink ;
 
-       Byte_Value MIN ; 
-       Byte_Value MAX ;
-       
        FS( FILESYSTEM fstype = FS_UNKNOWN ) : filesystem( fstype )
        {
                busy = read = read_label = write_label = read_uuid = write_uuid = create =
                create_with_label = grow = shrink = move = check = copy = remove = online_read =
                online_grow = online_shrink = NONE ;
-               MIN = MAX = 0 ;
        } 
 } ;
 
diff --git a/src/btrfs.cc b/src/btrfs.cc
index e740d65..80d3517 100644
--- a/src/btrfs.cc
+++ b/src/btrfs.cc
@@ -130,7 +130,6 @@ FS btrfs::get_filesystem_support()
        }
 #endif
 
-       fs .MIN = 256 * MEBIBYTE ;
        fs_limits.min_size = 256 * MEBIBYTE;
 
        //Linux before version 3.2 fails when resizing btrfs file system
diff --git a/src/ext2.cc b/src/ext2.cc
index 07e2769..8c2291f 100644
--- a/src/ext2.cc
+++ b/src/ext2.cc
@@ -161,10 +161,7 @@ FS ext2::get_filesystem_support()
                if ( specific_type == FS_EXT2                             ||
                     specific_type == FS_EXT3                             ||
                     ( specific_type == FS_EXT4 && ! have_64bit_feature )    )
-               {
-                       fs.MAX = Utils::floor_size( 16 * TEBIBYTE - 4 * KIBIBYTE, MEBIBYTE );
                        fs_limits.max_size = Utils::floor_size( 16 * TEBIBYTE - 4 * KIBIBYTE, MEBIBYTE );
-               }
        }
 
        return fs ;
diff --git a/src/fat16.cc b/src/fat16.cc
index bf0f9e3..4abb415 100644
--- a/src/fat16.cc
+++ b/src/fat16.cc
@@ -113,20 +113,16 @@ FS fat16::get_filesystem_support()
 
        if ( fs .filesystem == FS_FAT16 )
        {
-               fs .MIN = 16 * MEBIBYTE ;
-               fs .MAX = (4096 - 1) * MEBIBYTE ;  //Maximum seems to be just less than 4096 MiB
                fs_limits.min_size = 16 * MEBIBYTE;
                fs_limits.max_size = (4096 - 1) * MEBIBYTE;  // Maximum seems to be just less than 4096 MiB.
        }
        else //FS_FAT32
        {
-               fs .MIN = 33 * MEBIBYTE ; //Smaller file systems will cause windows scandisk to fail.
                fs_limits.min_size = 33 * MEBIBYTE;  // Smaller file systems will cause Windows' scandisk to 
fail.
 
                // Maximum FAT32 volume size with 512 byte sectors is 2 TiB.
                // *   Wikipedia: File Allocation Table / FAT32
                //     https://en.wikipedia.org/wiki/File_Allocation_Table#FAT32
-               fs.MAX = 2 * TEBIBYTE;
                fs_limits.max_size = 2 * TEBIBYTE;
        }
 
diff --git a/src/hfs.cc b/src/hfs.cc
index 95a8751..fef1a31 100644
--- a/src/hfs.cc
+++ b/src/hfs.cc
@@ -45,7 +45,6 @@ FS hfs::get_filesystem_support()
        fs .move = GParted::FS::GPARTED ;
        fs .online_read = FS::GPARTED ;
 
-       fs .MAX = 2048 * MEBIBYTE ;
        fs_limits.max_size = 2048 * MEBIBYTE;
 
        return fs ;
diff --git a/src/jfs.cc b/src/jfs.cc
index 7804bfc..644ca31 100644
--- a/src/jfs.cc
+++ b/src/jfs.cc
@@ -68,7 +68,6 @@ FS jfs::get_filesystem_support()
                fs .online_grow = fs .grow ;
 #endif
 
-       fs .MIN = 16 * MEBIBYTE ;
        fs_limits.min_size = 16 * MEBIBYTE;
 
        return fs ;
diff --git a/src/nilfs2.cc b/src/nilfs2.cc
index 84c65b8..ecc5573 100644
--- a/src/nilfs2.cc
+++ b/src/nilfs2.cc
@@ -66,7 +66,6 @@ FS nilfs2::get_filesystem_support()
 #endif
 
        //Minimum FS size is 128M+4K using mkfs.nilfs2 defaults
-       fs .MIN = 128 * MEBIBYTE + 4 * KIBIBYTE ;
        fs_limits.min_size = 128 * MEBIBYTE + 4 * KIBIBYTE;
 
        return fs ;
diff --git a/src/ntfs.cc b/src/ntfs.cc
index 2cf266f..4c7ba47 100644
--- a/src/ntfs.cc
+++ b/src/ntfs.cc
@@ -115,7 +115,6 @@ FS ntfs::get_filesystem_support()
        //Minimum NTFS partition size = (Minimum NTFS volume size) + (backup NTFS boot sector)
        //                            = (1 MiB) + (1 sector)
        // For GParted this means 2 MiB because smallest GUI unit is MiB.
-       fs. MIN = 2 * MEBIBYTE;
        fs_limits.min_size = 2 * MEBIBYTE;
 
        return fs ;
diff --git a/src/reiserfs.cc b/src/reiserfs.cc
index 3c44788..5dcca9e 100644
--- a/src/reiserfs.cc
+++ b/src/reiserfs.cc
@@ -71,7 +71,6 @@ FS reiserfs::get_filesystem_support()
 #endif
 
        //Actual minimum is at least 18 blocks larger than 32 MiB for the journal offset
-       fs .MIN = 34 * MEBIBYTE ;
        fs_limits.min_size = 34 * MEBIBYTE;
 
        return fs ;
diff --git a/src/udf.cc b/src/udf.cc
index 1389800..204496c 100644
--- a/src/udf.cc
+++ b/src/udf.cc
@@ -64,8 +64,6 @@ FS udf::get_filesystem_support()
                fs.write_uuid = FS::EXTERNAL;
        }
 
-       fs.MIN = MIN_UDF_BLOCKS * MIN_UDF_BLOCKSIZE;
-       fs.MAX = MAX_UDF_BLOCKS * MAX_UDF_BLOCKSIZE;
        fs_limits.min_size = MIN_UDF_BLOCKS * MIN_UDF_BLOCKSIZE;
        fs_limits.max_size = MAX_UDF_BLOCKS * MAX_UDF_BLOCKSIZE;
 
diff --git a/src/xfs.cc b/src/xfs.cc
index 203cd46..83d04ff 100644
--- a/src/xfs.cc
+++ b/src/xfs.cc
@@ -79,8 +79,8 @@ FS xfs::get_filesystem_support()
                fs .online_grow = fs .grow ;
 #endif
 
-       fs .MIN = 32 * MEBIBYTE ;//official minsize = 16MB, but the smallest xfs_repair can handle is 32MB...
-       fs_limits.min_size = 32 * MEBIBYTE;  // Official minsize = 16MB, but the smallest xfs_repair can 
handle is 32MB.
+       // Official minsize = 16MB, but the smallest xfs_repair can handle is 32MB.
+       fs_limits.min_size = 32 * MEBIBYTE;
 
        return fs ;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]