[gparted] Assign to duplicate FS_Limits (#787204)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Assign to duplicate FS_Limits (#787204)
- Date: Sun, 28 Jan 2018 17:14:55 +0000 (UTC)
commit aea0070799e9d52154608d8a0c7008c668a71878
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Thu Jan 11 23:21:56 2018 +0000
Assign to duplicate FS_Limits (#787204)
Duplicate the assignment of file system size limits into
struct FS_Limits, matching the fixed values currently assigned to
struct FS members .MIN and .MAX.
Bug 787204 - Minimum and maximum size of the UDF partition/disk
src/btrfs.cc | 1 +
src/ext2.cc | 3 +++
src/fat16.cc | 4 ++++
src/hfs.cc | 3 ++-
src/jfs.cc | 3 ++-
src/nilfs2.cc | 1 +
src/ntfs.cc | 1 +
src/reiserfs.cc | 3 ++-
src/udf.cc | 2 ++
src/xfs.cc | 3 ++-
10 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/src/btrfs.cc b/src/btrfs.cc
index 745d07b..e740d65 100644
--- a/src/btrfs.cc
+++ b/src/btrfs.cc
@@ -131,6 +131,7 @@ 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
// to the same size.
diff --git a/src/ext2.cc b/src/ext2.cc
index bb9df9b..07e2769 100644
--- a/src/ext2.cc
+++ b/src/ext2.cc
@@ -161,7 +161,10 @@ 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 b6c83fa..bf0f9e3 100644
--- a/src/fat16.cc
+++ b/src/fat16.cc
@@ -115,15 +115,19 @@ FS fat16::get_filesystem_support()
{
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;
}
return fs ;
diff --git a/src/hfs.cc b/src/hfs.cc
index f5ba92c..95a8751 100644
--- a/src/hfs.cc
+++ b/src/hfs.cc
@@ -46,7 +46,8 @@ FS hfs::get_filesystem_support()
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 f788443..7804bfc 100644
--- a/src/jfs.cc
+++ b/src/jfs.cc
@@ -69,7 +69,8 @@ FS jfs::get_filesystem_support()
#endif
fs .MIN = 16 * MEBIBYTE ;
-
+ fs_limits.min_size = 16 * MEBIBYTE;
+
return fs ;
}
diff --git a/src/nilfs2.cc b/src/nilfs2.cc
index 05b42d7..84c65b8 100644
--- a/src/nilfs2.cc
+++ b/src/nilfs2.cc
@@ -67,6 +67,7 @@ FS nilfs2::get_filesystem_support()
//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 547aec9..2cf266f 100644
--- a/src/ntfs.cc
+++ b/src/ntfs.cc
@@ -116,6 +116,7 @@ FS ntfs::get_filesystem_support()
// = (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 54b5f0e..3c44788 100644
--- a/src/reiserfs.cc
+++ b/src/reiserfs.cc
@@ -72,7 +72,8 @@ FS reiserfs::get_filesystem_support()
//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 72d17ca..1389800 100644
--- a/src/udf.cc
+++ b/src/udf.cc
@@ -66,6 +66,8 @@ FS udf::get_filesystem_support()
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;
return fs;
}
diff --git a/src/xfs.cc b/src/xfs.cc
index 1fe3f52..203cd46 100644
--- a/src/xfs.cc
+++ b/src/xfs.cc
@@ -80,7 +80,8 @@ FS xfs::get_filesystem_support()
#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.
+
return fs ;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]