[gparted] Move struct FS and FS_Limits into FileSystem.h
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Move struct FS and FS_Limits into FileSystem.h
- Date: Sun, 28 Jan 2018 17:16:11 +0000 (UTC)
commit a3b47ca14a14640ed9fd3aef660a101db761d4dd
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Thu Jan 18 16:26:20 2018 +0000
Move struct FS and FS_Limits into FileSystem.h
Struct FS and struct FS_Limits are strongly related to the FileSystem
class, both being return values from members and associated with storing
file system attributes. Move their definitions from Utils.h into
FileSystem.h.
include/DialogFeatures.h | 2 +-
include/Dialog_Base_Partition.h | 2 +-
include/Dialog_Partition_Copy.h | 2 +-
include/Dialog_Partition_Resize_Move.h | 2 +-
include/FileSystem.h | 48 +++++++++++++++++++++++++++++++
include/Utils.h | 49 --------------------------------
src/DialogFeatures.cc | 1 +
src/Dialog_Partition_Copy.cc | 1 +
src/Dialog_Partition_New.cc | 1 +
src/Dialog_Partition_Resize_Move.cc | 1 +
src/btrfs.cc | 1 +
src/exfat.cc | 2 +-
src/ext2.cc | 1 +
src/f2fs.cc | 1 +
src/fat16.cc | 1 +
src/hfs.cc | 1 +
src/hfsplus.cc | 1 +
src/jfs.cc | 1 +
src/linux_swap.cc | 1 +
src/luks.cc | 1 +
src/lvm2_pv.cc | 1 +
src/nilfs2.cc | 1 +
src/ntfs.cc | 1 +
src/reiser4.cc | 1 +
src/reiserfs.cc | 1 +
src/udf.cc | 1 +
src/ufs.cc | 1 +
src/xfs.cc | 1 +
28 files changed, 74 insertions(+), 54 deletions(-)
---
diff --git a/include/DialogFeatures.h b/include/DialogFeatures.h
index 4d72d5a..ae8a8c7 100644
--- a/include/DialogFeatures.h
+++ b/include/DialogFeatures.h
@@ -18,7 +18,7 @@
#ifndef GPARTED_DIALOGFEATURES_H
#define GPARTED_DIALOGFEATURES_H
-#include "Utils.h"
+#include "FileSystem.h"
#include <gtkmm/dialog.h>
#include <gtkmm/frame.h>
diff --git a/include/Dialog_Base_Partition.h b/include/Dialog_Base_Partition.h
index 3612400..10a5292 100644
--- a/include/Dialog_Base_Partition.h
+++ b/include/Dialog_Base_Partition.h
@@ -19,8 +19,8 @@
#define GPARTED_DIALOG_BASE_PARTITION_H
#include "Frame_Resizer_Extended.h"
+#include "FileSystem.h"
#include "Partition.h"
-#include "Utils.h"
#include <gtkmm/dialog.h>
#include <gtkmm/stock.h>
diff --git a/include/Dialog_Partition_Copy.h b/include/Dialog_Partition_Copy.h
index 03e2048..bdc9c08 100644
--- a/include/Dialog_Partition_Copy.h
+++ b/include/Dialog_Partition_Copy.h
@@ -19,8 +19,8 @@
#define GPARTED_DIALOG_PARTITION_COPY_H
#include "Dialog_Base_Partition.h"
+#include "FileSystem.h"
#include "Partition.h"
-#include "Utils.h"
namespace GParted
{
diff --git a/include/Dialog_Partition_Resize_Move.h b/include/Dialog_Partition_Resize_Move.h
index 448dfe4..0f7dfe5 100644
--- a/include/Dialog_Partition_Resize_Move.h
+++ b/include/Dialog_Partition_Resize_Move.h
@@ -18,9 +18,9 @@
#define GPARTED_DIALOG_PARTITION_RESIZE_MOVE_H
#include "Dialog_Base_Partition.h"
+#include "FileSystem.h"
#include "Partition.h"
#include "PartitionVector.h"
-#include "Utils.h"
namespace GParted
{
diff --git a/include/FileSystem.h b/include/FileSystem.h
index 43d3675..0e65f7d 100644
--- a/include/FileSystem.h
+++ b/include/FileSystem.h
@@ -31,6 +31,54 @@
namespace GParted
{
+// Minimum and maximum file system size limits
+struct FS_Limits
+{
+ Byte_Value min_size; // 0 => no limit, +ve => limit defined. (As implemented by)
+ Byte_Value max_size; // -----------------"----------------- (code using these.)
+
+ FS_Limits() : min_size( 0 ) , max_size( 0 ) {};
+ FS_Limits( Byte_Value min, Byte_Value max ) : min_size( min ), max_size( max ) {};
+};
+
+// Struct to store file system support information
+struct FS
+{
+ enum Support
+ {
+ NONE = 0,
+ GPARTED = 1,
+ LIBPARTED = 2,
+ EXTERNAL = 3
+ };
+
+ FSType filesystem;
+ Support busy; // How to determine if partition/file system is busy
+ Support read; // Can and how to read sector usage while inactive
+ Support read_label;
+ Support write_label;
+ Support read_uuid;
+ Support write_uuid;
+ Support create;
+ Support create_with_label; // Can and how to format file system with label
+ Support grow;
+ Support shrink;
+ Support move; // start point and endpoint
+ Support check; // Some check tool available?
+ Support copy;
+ Support remove;
+ Support online_read; // Can and how to read sector usage while active
+ Support online_grow;
+ Support online_shrink;
+
+ FS( FSType 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;
+ }
+};
+
enum ExecFlags
{
EXEC_NONE = 1 << 0,
diff --git a/include/Utils.h b/include/Utils.h
index 9be31c6..0f10902 100644
--- a/include/Utils.h
+++ b/include/Utils.h
@@ -123,55 +123,6 @@ enum CUSTOM_TEXT
CTEXT_RESIZE_DISALLOWED_WARNING // File system resizing currently disallowed reason
} ;
-// Minimum and maximum file system size limits
-struct FS_Limits
-{
- Byte_Value min_size; // 0 => no limit, +ve => limit defined. (As implemented by)
- Byte_Value max_size; // -----------------"----------------- (code using these.)
-
- FS_Limits() : min_size( 0 ) , max_size( 0 ) {};
- FS_Limits( Byte_Value min, Byte_Value max ) : min_size( min ), max_size( max ) {};
-};
-
-//struct to store file system information
-struct FS
-{
- enum Support
- {
- NONE = 0,
- GPARTED = 1,
- LIBPARTED = 2,
- EXTERNAL = 3
- };
-
- FSType filesystem;
- Support busy ; //How to determine if partition/file system is busy
- Support read ; //Can and how to read sector usage while inactive
- Support read_label ;
- Support write_label ;
- Support read_uuid ;
- Support write_uuid ;
- Support create ;
- Support create_with_label ; //Can and how to format file system with label
- Support grow ;
- Support shrink ;
- Support move ; //startpoint and endpoint
- Support check ; //some checktool available?
- Support copy ;
- Support remove ;
- Support online_read ; //Can and how to read sector usage while active
- Support online_grow ;
- Support online_shrink ;
-
- FS( FSType 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 ;
- }
-} ;
-
-
class Utils
{
public:
diff --git a/src/DialogFeatures.cc b/src/DialogFeatures.cc
index 16062d0..a162647 100644
--- a/src/DialogFeatures.cc
+++ b/src/DialogFeatures.cc
@@ -16,6 +16,7 @@
*/
#include "DialogFeatures.h"
+#include "FileSystem.h"
#include "GParted_Core.h"
#include <gtkmm/stock.h>
diff --git a/src/Dialog_Partition_Copy.cc b/src/Dialog_Partition_Copy.cc
index eddc2c6..0b7037c 100644
--- a/src/Dialog_Partition_Copy.cc
+++ b/src/Dialog_Partition_Copy.cc
@@ -16,6 +16,7 @@
*/
#include "Dialog_Partition_Copy.h"
+#include "FileSystem.h"
#include "GParted_Core.h"
#include "Partition.h"
#include "Utils.h"
diff --git a/src/Dialog_Partition_New.cc b/src/Dialog_Partition_New.cc
index 24fb2bf..237b3af 100644
--- a/src/Dialog_Partition_New.cc
+++ b/src/Dialog_Partition_New.cc
@@ -16,6 +16,7 @@
*/
#include "Dialog_Partition_New.h"
+#include "FileSystem.h"
#include "GParted_Core.h"
#include "Partition.h"
#include "Utils.h"
diff --git a/src/Dialog_Partition_Resize_Move.cc b/src/Dialog_Partition_Resize_Move.cc
index 9bfa57d..eb72ec3 100644
--- a/src/Dialog_Partition_Resize_Move.cc
+++ b/src/Dialog_Partition_Resize_Move.cc
@@ -16,6 +16,7 @@
*/
#include "Dialog_Partition_Resize_Move.h"
+#include "FileSystem.h"
#include "GParted_Core.h"
#include "Partition.h"
#include "PartitionVector.h"
diff --git a/src/btrfs.cc b/src/btrfs.cc
index 80d3517..c80a398 100644
--- a/src/btrfs.cc
+++ b/src/btrfs.cc
@@ -17,6 +17,7 @@
#include "btrfs.h"
#include "BlockSpecial.h"
+#include "FileSystem.h"
#include "Mount_Info.h"
#include "Partition.h"
diff --git a/src/exfat.cc b/src/exfat.cc
index ce32b88..e17bbab 100644
--- a/src/exfat.cc
+++ b/src/exfat.cc
@@ -15,6 +15,7 @@
*/
#include "exfat.h"
+#include "FileSystem.h"
namespace GParted
{
@@ -32,4 +33,3 @@ FS exfat::get_filesystem_support()
}
} //GParted
-
diff --git a/src/ext2.cc b/src/ext2.cc
index 8c2291f..f127327 100644
--- a/src/ext2.cc
+++ b/src/ext2.cc
@@ -16,6 +16,7 @@
*/
#include "ext2.h"
+#include "FileSystem.h"
#include "OperationDetail.h"
#include "Partition.h"
#include "Utils.h"
diff --git a/src/f2fs.cc b/src/f2fs.cc
index 87e544e..561bb77 100644
--- a/src/f2fs.cc
+++ b/src/f2fs.cc
@@ -15,6 +15,7 @@
*/
#include "f2fs.h"
+#include "FileSystem.h"
#include "Partition.h"
namespace GParted
diff --git a/src/fat16.cc b/src/fat16.cc
index 4abb415..0c27322 100644
--- a/src/fat16.cc
+++ b/src/fat16.cc
@@ -16,6 +16,7 @@
*/
#include "fat16.h"
+#include "FileSystem.h"
#include "Partition.h"
/*****
diff --git a/src/hfs.cc b/src/hfs.cc
index fef1a31..62f5760 100644
--- a/src/hfs.cc
+++ b/src/hfs.cc
@@ -16,6 +16,7 @@
*/
#include "hfs.h"
+#include "FileSystem.h"
#include "Partition.h"
namespace GParted
diff --git a/src/hfsplus.cc b/src/hfsplus.cc
index fdc3d0f..c0ff439 100644
--- a/src/hfsplus.cc
+++ b/src/hfsplus.cc
@@ -16,6 +16,7 @@
*/
#include "hfsplus.h"
+#include "FileSystem.h"
#include "Partition.h"
namespace GParted
diff --git a/src/jfs.cc b/src/jfs.cc
index 644ca31..bcee88e 100644
--- a/src/jfs.cc
+++ b/src/jfs.cc
@@ -16,6 +16,7 @@
*/
#include "jfs.h"
+#include "FileSystem.h"
#include "Partition.h"
namespace GParted
diff --git a/src/linux_swap.cc b/src/linux_swap.cc
index 1266bcb..d276b3e 100644
--- a/src/linux_swap.cc
+++ b/src/linux_swap.cc
@@ -17,6 +17,7 @@
#include "linux_swap.h"
#include "BlockSpecial.h"
+#include "FileSystem.h"
#include "Partition.h"
#include <cerrno>
diff --git a/src/luks.cc b/src/luks.cc
index 0457531..a5be0d9 100644
--- a/src/luks.cc
+++ b/src/luks.cc
@@ -14,6 +14,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "FileSystem.h"
#include "LUKS_Info.h"
#include "Utils.h"
#include "luks.h"
diff --git a/src/lvm2_pv.cc b/src/lvm2_pv.cc
index 8cb76e5..15af3eb 100644
--- a/src/lvm2_pv.cc
+++ b/src/lvm2_pv.cc
@@ -14,6 +14,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "FileSystem.h"
#include "LVM2_PV_Info.h"
#include "lvm2_pv.h"
#include "Partition.h"
diff --git a/src/nilfs2.cc b/src/nilfs2.cc
index ecc5573..9d2cf2b 100644
--- a/src/nilfs2.cc
+++ b/src/nilfs2.cc
@@ -15,6 +15,7 @@
*/
#include "nilfs2.h"
+#include "FileSystem.h"
#include "Partition.h"
namespace GParted
diff --git a/src/ntfs.cc b/src/ntfs.cc
index 4c7ba47..4fbf137 100644
--- a/src/ntfs.cc
+++ b/src/ntfs.cc
@@ -16,6 +16,7 @@
*/
#include "ntfs.h"
+#include "FileSystem.h"
#include "OperationDetail.h"
#include "Partition.h"
#include "Utils.h"
diff --git a/src/reiser4.cc b/src/reiser4.cc
index c222412..556cefc 100644
--- a/src/reiser4.cc
+++ b/src/reiser4.cc
@@ -16,6 +16,7 @@
*/
#include "reiser4.h"
+#include "FileSystem.h"
#include "Partition.h"
namespace GParted
diff --git a/src/reiserfs.cc b/src/reiserfs.cc
index 5dcca9e..0d6bd88 100644
--- a/src/reiserfs.cc
+++ b/src/reiserfs.cc
@@ -16,6 +16,7 @@
*/
#include "reiserfs.h"
+#include "FileSystem.h"
#include "Partition.h"
namespace GParted
diff --git a/src/udf.cc b/src/udf.cc
index 7a0baa3..46c91d6 100644
--- a/src/udf.cc
+++ b/src/udf.cc
@@ -15,6 +15,7 @@
*/
#include "udf.h"
+#include "FileSystem.h"
#include "Partition.h"
#include "Utils.h"
diff --git a/src/ufs.cc b/src/ufs.cc
index 5067a0f..1630764 100644
--- a/src/ufs.cc
+++ b/src/ufs.cc
@@ -16,6 +16,7 @@
*/
#include "ufs.h"
+#include "FileSystem.h"
namespace GParted
{
diff --git a/src/xfs.cc b/src/xfs.cc
index 83d04ff..11f590e 100644
--- a/src/xfs.cc
+++ b/src/xfs.cc
@@ -16,6 +16,7 @@
*/
#include "xfs.h"
+#include "FileSystem.h"
#include "OperationDetail.h"
#include "Partition.h"
#include "Utils.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]