Cleanup duplicate fs code
Many filesystems do not implement some of their methods, but had to provide dummy implementations. Remove all of the dummy implementations and instead just provide one in the base FileSystem class.
This commit is contained in:
parent
4c249b4d65
commit
e4210ba08d
|
@ -39,24 +39,24 @@ public:
|
|||
static const Glib::ustring get_generic_text( CUSTOM_TEXT ttype, int index = 0 ) ;
|
||||
|
||||
virtual FS get_filesystem_support() = 0 ;
|
||||
virtual void set_used_sectors( Partition & partition ) = 0 ;
|
||||
virtual void read_label( Partition & partition ) = 0 ;
|
||||
virtual bool write_label( const Partition & partition, OperationDetail & operationdetail ) = 0 ;
|
||||
virtual void read_uuid( Partition & partition ) = 0 ;
|
||||
virtual bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) = 0 ;
|
||||
virtual bool create( const Partition & new_partition, OperationDetail & operationdetail ) = 0 ;
|
||||
virtual void set_used_sectors( Partition & partition ) {};
|
||||
virtual void read_label( Partition & partition ) {};
|
||||
virtual bool write_label( const Partition & partition, OperationDetail & operationdetail ) { return false; };
|
||||
virtual void read_uuid( Partition & partition ) {};
|
||||
virtual bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) { return false; };
|
||||
virtual bool create( const Partition & new_partition, OperationDetail & operationdetail ) { return false; };
|
||||
virtual bool resize( const Partition & partition_new,
|
||||
OperationDetail & operationdetail,
|
||||
bool fill_partition = false ) = 0 ;
|
||||
bool fill_partition = false ) { return false; };
|
||||
virtual bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) = 0 ;
|
||||
) { return false; };
|
||||
virtual bool copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail ) = 0 ;
|
||||
virtual bool check_repair( const Partition & partition, OperationDetail & operationdetail ) = 0 ;
|
||||
virtual bool remove( const Partition & partition, OperationDetail & operationdetail ) = 0 ;
|
||||
OperationDetail & operationdetail ) { return false; };
|
||||
virtual bool check_repair( const Partition & partition, OperationDetail & operationdetail ) { return false; };
|
||||
virtual bool remove( const Partition & partition, OperationDetail & operationdetail ) { return true; };
|
||||
bool success;
|
||||
protected:
|
||||
int execute_command( const Glib::ustring & command, OperationDetail & operationdetail,
|
||||
|
|
|
@ -32,18 +32,9 @@ public:
|
|||
void read_label( Partition & partition ) ;
|
||||
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
void read_uuid( Partition & partition ) ;
|
||||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail ) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
|
||||
private:
|
||||
static Byte_Value btrfs_size_to_num( Glib::ustring str, Byte_Value ptn_bytes, bool scale_up ) ;
|
||||
|
|
|
@ -28,26 +28,6 @@ class exfat : public FileSystem
|
|||
{
|
||||
public:
|
||||
FS get_filesystem_support() ;
|
||||
void set_used_sectors( Partition & partition ) ;
|
||||
void read_label( Partition & partition ) ;
|
||||
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
void read_uuid( Partition & partition ) ;
|
||||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new
|
||||
, OperationDetail & operationdetail
|
||||
, bool fill_partition = false
|
||||
) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path
|
||||
, const Glib::ustring & dest_part_path
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
};
|
||||
|
||||
} //GParted
|
||||
|
|
|
@ -38,15 +38,7 @@ public:
|
|||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail ) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
};
|
||||
|
||||
} //GParted
|
||||
|
|
|
@ -36,16 +36,7 @@ public:
|
|||
void read_uuid( Partition & partition ) ;
|
||||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail ) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
|
||||
static const Glib::ustring Change_UUID_Warning [] ;
|
||||
};
|
||||
|
|
|
@ -36,16 +36,7 @@ public:
|
|||
void read_uuid( Partition & partition ) ;
|
||||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail ) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
|
||||
const static Glib::ustring ( & Change_UUID_Warning ) [] ;
|
||||
};
|
||||
|
|
|
@ -29,22 +29,9 @@ class hfs : public FileSystem
|
|||
{
|
||||
public:
|
||||
FS get_filesystem_support() ;
|
||||
void set_used_sectors( Partition & partition ) ;
|
||||
void read_label( Partition & partition ) ;
|
||||
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
void read_uuid( Partition & partition ) ;
|
||||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail ) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
};
|
||||
|
||||
} //GParted
|
||||
|
|
|
@ -29,22 +29,9 @@ class hfsplus : public FileSystem
|
|||
{
|
||||
public:
|
||||
FS get_filesystem_support() ;
|
||||
void set_used_sectors( Partition & partition ) ;
|
||||
void read_label( Partition & partition ) ;
|
||||
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
void read_uuid( Partition & partition ) ;
|
||||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail ) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
};
|
||||
|
||||
} //GParted
|
||||
|
|
|
@ -36,15 +36,7 @@ public:
|
|||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail ) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
};
|
||||
|
||||
} //GParted
|
||||
|
|
|
@ -31,7 +31,6 @@ public:
|
|||
virtual const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) ;
|
||||
|
||||
FS get_filesystem_support() ;
|
||||
void set_used_sectors( Partition & partition ) ;
|
||||
void read_label( Partition & partition ) ;
|
||||
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
void read_uuid( Partition & partition ) ;
|
||||
|
@ -45,8 +44,6 @@ public:
|
|||
bool copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail ) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
};
|
||||
|
||||
} //GParted
|
||||
|
|
|
@ -30,19 +30,8 @@ public:
|
|||
const Glib::ustring get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) ;
|
||||
FS get_filesystem_support() ;
|
||||
void set_used_sectors( Partition & partition ) ;
|
||||
void read_label( Partition & partition ) ;
|
||||
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
void read_uuid( Partition & partition ) ;
|
||||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path
|
||||
, const Glib::ustring & dest_part_path
|
||||
, OperationDetail & operationdetail ) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
};
|
||||
|
|
|
@ -35,16 +35,6 @@ public:
|
|||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path
|
||||
, const Glib::ustring & dest_part_path
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
};
|
||||
|
||||
} //GParted
|
||||
|
|
|
@ -37,15 +37,10 @@ public:
|
|||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail ) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
|
||||
static const Glib::ustring Change_UUID_Warning [] ;
|
||||
};
|
||||
|
|
|
@ -31,20 +31,9 @@ public:
|
|||
FS get_filesystem_support() ;
|
||||
void set_used_sectors( Partition & partition ) ;
|
||||
void read_label( Partition & partition ) ;
|
||||
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
void read_uuid( Partition & partition ) ;
|
||||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail ) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
};
|
||||
|
||||
} //GParted
|
||||
|
|
|
@ -36,15 +36,7 @@ public:
|
|||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail ) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
};
|
||||
|
||||
} //GParted
|
||||
|
|
|
@ -29,22 +29,6 @@ class ufs : public FileSystem
|
|||
{
|
||||
public:
|
||||
FS get_filesystem_support() ;
|
||||
void set_used_sectors( Partition & partition ) ;
|
||||
void read_label( Partition & partition ) ;
|
||||
bool write_label( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
void read_uuid( Partition & partition ) ;
|
||||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail ) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
};
|
||||
|
||||
} //GParted
|
||||
|
|
|
@ -36,15 +36,10 @@ public:
|
|||
bool write_uuid( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool create( const Partition & new_partition, OperationDetail & operationdetail ) ;
|
||||
bool resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition = false ) ;
|
||||
bool move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
) ;
|
||||
bool copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail ) ;
|
||||
bool check_repair( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
bool remove( const Partition & partition, OperationDetail & operationdetail ) ;
|
||||
};
|
||||
|
||||
} //GParted
|
||||
|
|
26
src/btrfs.cc
26
src/btrfs.cc
|
@ -166,27 +166,6 @@ bool btrfs::write_label( const Partition & partition, OperationDetail & operatio
|
|||
return ! execute_command( "btrfs filesystem label " + partition .get_path() + " \"" + partition .get_label() + "\"", operationdetail ) ;
|
||||
}
|
||||
|
||||
bool btrfs::write_uuid( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool btrfs::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool btrfs::copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail )
|
||||
{
|
||||
// TODO
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool btrfs::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
|
||||
{
|
||||
bool success = true ;
|
||||
|
@ -313,11 +292,6 @@ void btrfs::read_uuid( Partition & partition )
|
|||
}
|
||||
}
|
||||
|
||||
bool btrfs::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
//Private methods
|
||||
|
||||
//Return the value of a btrfs tool formatted size, including reversing
|
||||
|
|
60
src/exfat.cc
60
src/exfat.cc
|
@ -34,65 +34,5 @@ FS exfat::get_filesystem_support()
|
|||
return fs ;
|
||||
}
|
||||
|
||||
void exfat::set_used_sectors( Partition & partition )
|
||||
{
|
||||
}
|
||||
|
||||
void exfat::read_label( Partition & partition )
|
||||
{
|
||||
}
|
||||
|
||||
bool exfat::write_label( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
void exfat::read_uuid( Partition & partition )
|
||||
{
|
||||
}
|
||||
|
||||
bool exfat::write_uuid( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool exfat::create( const Partition & new_partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool exfat::resize( const Partition & partition_new
|
||||
, OperationDetail & operationdetail
|
||||
, bool fill_partition )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool exfat::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool exfat::copy( const Glib::ustring & src_part_path
|
||||
, const Glib::ustring & dest_part_path
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool exfat::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool exfat::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
||||
|
|
20
src/ext2.cc
20
src/ext2.cc
|
@ -191,21 +191,6 @@ bool ext2::resize( const Partition & partition_new, OperationDetail & operationd
|
|||
return ! execute_command( str_temp, operationdetail ) ;
|
||||
}
|
||||
|
||||
bool ext2::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool ext2::copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool ext2::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
exit_status = execute_command( "e2fsck -f -y -v " + partition.get_path(), operationdetail,
|
||||
|
@ -216,11 +201,6 @@ bool ext2::check_repair( const Partition & partition, OperationDetail & operatio
|
|||
return ( exit_status == 0 || exit_status == 1 || exit_status == 2 || exit_status == 256 ) ;
|
||||
}
|
||||
|
||||
bool ext2::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
||||
|
||||
|
|
25
src/fat16.cc
25
src/fat16.cc
|
@ -234,26 +234,6 @@ bool fat16::create( const Partition & new_partition, OperationDetail & operation
|
|||
true );
|
||||
}
|
||||
|
||||
bool fat16::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool fat16::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool fat16::copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool fat16::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
exit_status = execute_command( "dosfsck -a -w -v " + partition .get_path(), operationdetail,
|
||||
|
@ -262,11 +242,6 @@ bool fat16::check_repair( const Partition & partition, OperationDetail & operati
|
|||
return ( exit_status == 0 || exit_status == 1 || exit_status == 256 ) ;
|
||||
}
|
||||
|
||||
bool fat16::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
||||
|
||||
|
|
25
src/fat32.cc
25
src/fat32.cc
|
@ -223,26 +223,6 @@ bool fat32::create( const Partition & new_partition, OperationDetail & operation
|
|||
false, true );
|
||||
}
|
||||
|
||||
bool fat32::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool fat32::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool fat32::copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool fat32::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
exit_status = execute_command( "dosfsck -a -w -v " + partition.get_path(), operationdetail,
|
||||
|
@ -251,9 +231,4 @@ bool fat32::check_repair( const Partition & partition, OperationDetail & operati
|
|||
return ( exit_status == 0 || exit_status == 1 || exit_status == 256 ) ;
|
||||
}
|
||||
|
||||
bool fat32::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
|
43
src/hfs.cc
43
src/hfs.cc
|
@ -51,10 +51,6 @@ FS hfs::get_filesystem_support()
|
|||
return fs ;
|
||||
}
|
||||
|
||||
void hfs::set_used_sectors( Partition & partition )
|
||||
{
|
||||
}
|
||||
|
||||
void hfs::read_label( Partition & partition )
|
||||
{
|
||||
if ( ! Utils::execute_command( "vol_id " + partition .get_path(), output, error, true ) )
|
||||
|
@ -76,20 +72,6 @@ void hfs::read_label( Partition & partition )
|
|||
}
|
||||
}
|
||||
|
||||
bool hfs::write_label( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
void hfs::read_uuid( Partition & partition )
|
||||
{
|
||||
}
|
||||
|
||||
bool hfs::write_uuid( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool hfs::create( const Partition & new_partition, OperationDetail & operationdetail )
|
||||
{
|
||||
Glib::ustring cmd = "";
|
||||
|
@ -100,35 +82,10 @@ bool hfs::create( const Partition & new_partition, OperationDetail & operationde
|
|||
return ! execute_command( cmd , operationdetail ) ;
|
||||
}
|
||||
|
||||
bool hfs::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool hfs::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool hfs::copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool hfs::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
//FIXME: find out what the returnvalue is in case of modified.. also check what the -a flag does.. (there is no manpage)
|
||||
return ! execute_command( "hfsck -v " + partition .get_path(), operationdetail ) ;
|
||||
}
|
||||
|
||||
bool hfs::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
|
|
@ -49,10 +49,6 @@ FS hfsplus::get_filesystem_support()
|
|||
return fs ;
|
||||
}
|
||||
|
||||
void hfsplus::set_used_sectors( Partition & partition )
|
||||
{
|
||||
}
|
||||
|
||||
void hfsplus::read_label( Partition & partition )
|
||||
{
|
||||
if ( ! Utils::execute_command( "vol_id " + partition .get_path(), output, error, true ) )
|
||||
|
@ -74,20 +70,6 @@ void hfsplus::read_label( Partition & partition )
|
|||
}
|
||||
}
|
||||
|
||||
bool hfsplus::write_label( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
void hfsplus::read_uuid( Partition & partition )
|
||||
{
|
||||
}
|
||||
|
||||
bool hfsplus::write_uuid( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool hfsplus::create( const Partition & new_partition, OperationDetail & operationdetail )
|
||||
{
|
||||
Glib::ustring cmd = "";
|
||||
|
@ -98,34 +80,9 @@ bool hfsplus::create( const Partition & new_partition, OperationDetail & operati
|
|||
return ! execute_command( cmd , operationdetail ) ;
|
||||
}
|
||||
|
||||
bool hfsplus::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool hfsplus::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool hfsplus::copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool hfsplus::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return ! execute_command( "fsck.hfsplus -f -y " + partition .get_path(), operationdetail ) ;
|
||||
}
|
||||
|
||||
bool hfsplus::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
|
20
src/jfs.cc
20
src/jfs.cc
|
@ -178,21 +178,6 @@ bool jfs::resize( const Partition & partition_new, OperationDetail & operationde
|
|||
return success ;
|
||||
}
|
||||
|
||||
bool jfs::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool jfs::copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool jfs::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
exit_status = execute_command( "jfs_fsck -f " + partition.get_path(), operationdetail,
|
||||
|
@ -201,11 +186,6 @@ bool jfs::check_repair( const Partition & partition, OperationDetail & operation
|
|||
return ( exit_status == 0 || exit_status == 1 ) ;
|
||||
}
|
||||
|
||||
bool jfs::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
||||
|
||||
|
|
|
@ -64,10 +64,6 @@ FS linux_swap::get_filesystem_support()
|
|||
return fs ;
|
||||
}
|
||||
|
||||
void linux_swap::set_used_sectors( Partition & partition )
|
||||
{
|
||||
}
|
||||
|
||||
void linux_swap::read_label( Partition & partition )
|
||||
{
|
||||
if ( ! Utils::execute_command( "swaplabel " + partition .get_path(), output, error, true ) )
|
||||
|
@ -172,14 +168,4 @@ bool linux_swap::copy( const Glib::ustring & src_part_path,
|
|||
return true ;
|
||||
}
|
||||
|
||||
bool linux_swap::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool linux_swap::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
|
|
@ -86,25 +86,6 @@ void lvm2_pv::set_used_sectors( Partition & partition )
|
|||
}
|
||||
}
|
||||
|
||||
void lvm2_pv::read_label( Partition & partition )
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
bool lvm2_pv::write_label( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
void lvm2_pv::read_uuid( Partition & partition )
|
||||
{
|
||||
}
|
||||
|
||||
bool lvm2_pv::write_uuid( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool lvm2_pv::create( const Partition & new_partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return ! execute_command( "lvm pvcreate -M 2 " + new_partition .get_path(), operationdetail ) ;
|
||||
|
@ -120,34 +101,6 @@ bool lvm2_pv::resize( const Partition & partition_new, OperationDetail & operati
|
|||
return ! execute_command( "lvm pvresize -v " + size + partition_new .get_path(), operationdetail ) ;
|
||||
}
|
||||
|
||||
bool lvm2_pv::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool lvm2_pv::copy( const Glib::ustring & src_part_path
|
||||
, const Glib::ustring & dest_part_path
|
||||
, OperationDetail & operationdetail )
|
||||
{
|
||||
//Copy not implemented.
|
||||
// Metadata fully describing a Volume Group is stored at the start of
|
||||
// each Physical Volume member. Internally LVM2 primarily uses UUIDs
|
||||
// to uniquely identify all objects (PVs, VG and LVs) but the interface
|
||||
// uses device names and VG and LV names. The general case of copying
|
||||
// a PV could confuse LVM2 because it will result in duplicate objects,
|
||||
// or even duplicate partial VGs and LVs if they span multiple PVs, so
|
||||
// it is not safe and should be achieved using other LVM2 commands. A
|
||||
// specific case of copying a PV is the right action when it is as part
|
||||
// of the transfer of an exported VG to a remote machine via storage
|
||||
// which will be detached from the local machine and attached to the
|
||||
// remote machine, but would probably fit better at a VG manipulation
|
||||
// layer. Thus copying of PVs is not implemented.
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool lvm2_pv::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return ! execute_command( "lvm pvck -v " + partition .get_path(), operationdetail ) ;
|
||||
|
|
|
@ -185,30 +185,4 @@ bool nilfs2::resize( const Partition & partition_new, OperationDetail & operatio
|
|||
return success ;
|
||||
}
|
||||
|
||||
bool nilfs2::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool nilfs2::copy( const Glib::ustring & src_part_path
|
||||
, const Glib::ustring & dest_part_path
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool nilfs2::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool nilfs2::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
|
13
src/ntfs.cc
13
src/ntfs.cc
|
@ -224,14 +224,6 @@ bool ntfs::resize( const Partition & partition_new, OperationDetail & operationd
|
|||
return return_value ;
|
||||
}
|
||||
|
||||
bool ntfs::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool ntfs::copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail )
|
||||
|
@ -247,11 +239,6 @@ bool ntfs::check_repair( const Partition & partition, OperationDetail & operatio
|
|||
return ! execute_command( "ntfsresize -P -i -f -v " + partition .get_path(), operationdetail ) ;
|
||||
}
|
||||
|
||||
bool ntfs::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
||||
|
||||
|
|
|
@ -115,11 +115,6 @@ void reiser4::read_label( Partition & partition )
|
|||
}
|
||||
}
|
||||
|
||||
bool reiser4::write_label( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
void reiser4::read_uuid( Partition & partition )
|
||||
{
|
||||
if ( ! Utils::execute_command( "debugfs.reiser4 " + partition .get_path(), output, error, true ) )
|
||||
|
@ -136,11 +131,6 @@ void reiser4::read_uuid( Partition & partition )
|
|||
}
|
||||
}
|
||||
|
||||
bool reiser4::write_uuid( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool reiser4::create( const Partition & new_partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return ! execute_command( "mkfs.reiser4 --yes --label \"" + new_partition.get_label() +
|
||||
|
@ -148,37 +138,12 @@ bool reiser4::create( const Partition & new_partition, OperationDetail & operati
|
|||
false, true );
|
||||
}
|
||||
|
||||
bool reiser4::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool reiser4::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool reiser4::copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool reiser4::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return ! execute_command( "fsck.reiser4 --yes --fix --quiet " + partition.get_path(),
|
||||
operationdetail, false, true );
|
||||
}
|
||||
|
||||
bool reiser4::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
||||
|
||||
|
|
|
@ -169,21 +169,6 @@ bool reiserfs::resize( const Partition & partition_new, OperationDetail & operat
|
|||
return ( exit_status == 0 || exit_status == 256 ) ;
|
||||
}
|
||||
|
||||
bool reiserfs::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool reiserfs::copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool reiserfs::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
exit_status = execute_command( "reiserfsck --yes --fix-fixable --quiet " + partition.get_path(),
|
||||
|
@ -192,9 +177,4 @@ bool reiserfs::check_repair( const Partition & partition, OperationDetail & oper
|
|||
return ( exit_status == 0 || exit_status == 1 || exit_status == 256 ) ;
|
||||
}
|
||||
|
||||
bool reiserfs::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
|
57
src/ufs.cc
57
src/ufs.cc
|
@ -35,63 +35,6 @@ FS ufs::get_filesystem_support()
|
|||
return fs ;
|
||||
}
|
||||
|
||||
void ufs::set_used_sectors( Partition & partition )
|
||||
{
|
||||
}
|
||||
|
||||
void ufs::read_label( Partition & partition )
|
||||
{
|
||||
}
|
||||
|
||||
bool ufs::write_label( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
void ufs::read_uuid( Partition & partition )
|
||||
{
|
||||
}
|
||||
|
||||
bool ufs::write_uuid( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool ufs::create( const Partition & new_partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool ufs::resize( const Partition & partition_new, OperationDetail & operationdetail, bool fill_partition )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool ufs::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool ufs::copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool ufs::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool ufs::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
||||
|
||||
|
|
13
src/xfs.cc
13
src/xfs.cc
|
@ -194,14 +194,6 @@ bool xfs::resize( const Partition & partition_new, OperationDetail & operationde
|
|||
return success ;
|
||||
}
|
||||
|
||||
bool xfs::move( const Partition & partition_new
|
||||
, const Partition & partition_old
|
||||
, OperationDetail & operationdetail
|
||||
)
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool xfs::copy( const Glib::ustring & src_part_path,
|
||||
const Glib::ustring & dest_part_path,
|
||||
OperationDetail & operationdetail )
|
||||
|
@ -256,11 +248,6 @@ bool xfs::check_repair( const Partition & partition, OperationDetail & operation
|
|||
false, true );
|
||||
}
|
||||
|
||||
bool xfs::remove( const Partition & partition, OperationDetail & operationdetail )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
} //GParted
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue